-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple worlds #17
Merged
Merged
Multiple worlds #17
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for multiple parallell world instances
Breaking changes:
Configuration is now supplied when adding the plugin
Then when adding the plugin:
If you don't want to change any default config, you can simply do this:
Adding multiple worlds follows the same pattern. Just create different configuration structs and add a
VoxelWorldPlugin
for each.Each world instance can have it's own configuration and will keep track of it's own set of voxel data and chunks.
The
VoxelWorld
system param now needs a type parameter to specify which world instance you want to selectThe configuration struct adds the config values and its type also acts as a marker for the world instance.
If you initialized the plugin with
::default()
, you still need to explicitly specify the instance asDefaultWorld
:The
VoxelWorldRaycast
system param now also requires the same config type paramter as described above.