C#: Simulation System
A SimulationSystem
handles any system-level integration or any third party capabilities of the simulation. It’s similar to a singleton - it will only be created if requested by a C# script or unreal. There can only be 1 SimulationSystem
type in a simulation
How do I create a Simulation System?
When you create a new C# class, make sure you inherit from NominalSystems.Core.SimulationSystem
.
using NominalSystems.Core
public class MySimulationSystem : SimulationSystem
{
// ...Your code goes here...
}
How do I add/get a Simulation System?
The simulation will create the SimulationSystem
type ONCE when it is requested. You can use the GetSystem{T}
function to get the desired SimulationSystem
. Make sure your class inherits from one of the types below:
NominalSystems.Core.Component
NominalSystems.Core.ComponentModel
NominalSystems.Core.SimulationSystem
using NominalSystems.Core
public class AnotherClassInTheSimulation : Component
{
...
// This is a reference to `MySimulationSystem` wrapped as a property
protected MySimulationSystem => GetSystem<MySimulationSystem>();
...
}