Class World
public class World : IDisposable, IEquatable<World>
- Inheritance
-
World
- Implements
- Inherited Members
Properties
ComponentManager
Gets the component manager for this world.
public ComponentManager ComponentManager { get; }
Property Value
EntityCommandBuffer
Gets the main entity command buffer for this world.
public EntityCommandBuffer EntityCommandBuffer { get; }
Property Value
Remarks
Use GetThreadLocalEntityCommandBuffer(int) to get thread-local command buffers for multi-threaded jobs.
EntityManager
Gets the publicntity manager for this world.
public EntityManager EntityManager { get; }
Property Value
ID
Gets the unique identifier of this world.
public Identifier<World> ID { get; }
Property Value
- Identifier<World>
JobScheduler
Gets the job scheduler associated with this world.
public JobScheduler? JobScheduler { get; }
Property Value
- JobScheduler
SystemManager
Gets the system manager for this world.
public SystemManager SystemManager { get; }
Property Value
Version
Gets the current version number of the world.
public int Version { get; }
Property Value
WorldCount
public static int WorldCount { get; }
Property Value
Methods
AddService<T>(T)
Registers or overwrites a global resource in the world.
public void AddService<T>(T resource) where T : class
Parameters
resourceT
Type Parameters
T
Create(JobScheduler?, int)
public static World Create(JobScheduler? jobScheduler = null, int entityCapacity = 16)
Parameters
jobSchedulerJobSchedulerentityCapacityint
Returns
Destroy(Identifier<World>)
public static void Destroy(Identifier<World> id)
Parameters
idIdentifier<World>
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equals(World?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(World? other)
Parameters
otherWorldAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
~World()
protected ~World()
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetService<T>()
Retrieves a global resource from the world.
public T GetService<T>() where T : class
Returns
- T
Type Parameters
T
GetThreadLocalEntityCommandBuffer(int)
Gets the thread-local entity command buffer for the specified thread index.
public EntityCommandBuffer GetThreadLocalEntityCommandBuffer(int threadIndex)
Parameters
threadIndexint
Returns
GetWorld(Identifier<World>)
public static World? GetWorld(Identifier<World> id)
Parameters
idIdentifier<World>
Returns
GetWorldUncheck(Identifier<World>)
public static World GetWorldUncheck(Identifier<World> id)
Parameters
idIdentifier<World>
Returns
HasService<T>()
Checks if a global resource exists.
public bool HasService<T>() where T : class
Returns
Type Parameters
T
Operators
operator ==(World?, World?)
public static bool operator ==(World? left, World? right)
Parameters
Returns
operator !=(World?, World?)
public static bool operator !=(World? left, World? right)