antopilo / Nuake

Nuake is a modern engine inspired by the Quake engine that integrates with Trenchbroom
https://nuake.antopilo.dev
MIT License
203 stars 21 forks source link

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

Closed WiggleWizard closed 3 weeks ago

WiggleWizard commented 3 weeks ago

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.