Skip to content
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

First pass scriptable subsystems that has the same lifetime of the engine #90

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

WiggleWizard
Copy link
Collaborator

Subsystems can be created by simply just making a script that inherits from EngineSubsystem. This will span the same lifetime of the engine itself instead of being bound to the lifetime of a scene. Subsystems can be fetched by calling Engine.GetSubsystem<MySubsystemType>() in C# to get the subsystem. Validity is mostly guaranteed since this call is typesafe but it's always good to write a validity test to avoid crashes.

@WiggleWizard WiggleWizard linked an issue Sep 18, 2024 that may be closed by this pull request
@WiggleWizard WiggleWizard marked this pull request as draft September 18, 2024 12:18
@WiggleWizard WiggleWizard marked this pull request as ready for review September 18, 2024 20:48
@antopilo antopilo merged commit bd6b436 into antopilo:develop Sep 18, 2024
@WiggleWizard WiggleWizard deleted the feature/scriptable-subsystems branch September 19, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to create cross-scene singletons in C#
2 participants