Class DefaultTinyWorldInitialization
Inheritance
System.Object
DefaultTinyWorldInitialization
Namespace: Unity.Entities
Syntax
public static class DefaultTinyWorldInitialization
Methods
AddSystem(World, ComponentSystemBase)
Call this to add a System that was manually constructed; normally these Systems are marked with [DisableAutoCreation].
Declaration
public static void AddSystem(World world, ComponentSystemBase system)
Parameters
Type | Name | Description |
---|---|---|
World | world | |
ComponentSystemBase | system |
Initialize(String)
Initialize the Tiny World with all the boilerplate that needs to be done. ComponentSystems will be created and sorted into the high level ComponentSystemGroups.
Declaration
public static World Initialize(string worldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | worldName |
Returns
Type | Description |
---|---|
World |
Remarks
The simple use case is:
world = DefaultTinyWorldInitialization.InitializeWorld("main");
However, it's common to need to set initialization data. That can be done with the following code:
world = DefaultTinyWorldInitialization.InitializeWorld("main");
TinyEnvironment env = world.TinyEnvironment();
// set configuration variables...
DefaultTinyWorldInitialization.InitializeSystems(world);
See Also
InitializeSystems(World)
Initialize the ComponentSystems. See Initialize(String) for use.
Declaration
public static void InitializeSystems(World world)
Parameters
Type | Name | Description |
---|---|---|
World | world |
InitializeWorld(String)
Initialize the World object. See Initialize(String) for use.
Declaration
public static World InitializeWorld(string worldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | worldName |
Returns
Type | Description |
---|---|
World |