Documentation

Unity Engine


Unity Engine


WorldUnmanaged

A pointer-to-implementation for the unmanaged representation of a World.
Read time 2 minutesLast updated a day ago

Definition

public struct WorldUnmanaged : IEquatable<WorldUnmanaged>, IComparable<WorldUnmanaged>

Remarks

This is intended to stay small (8 bytes without collections checks, 32 bytes with padding with collections checks), because it is intended to be cheaply passed around by value.

Properties

Property

Description

EntityManagerAn interface to manipulate the World's entity data from the main thread
FlagsThe WorldFlags settings for this World
IsCreatedHas this World been successfully initialized?
MaximumDeltaTimeThe maximum single-frame delta time permitted in this world.
NameThe name of the World
SequenceNumberThe World's current sequence number
TimeThe world's simulated time, include elapsed time since World creation and the delta time since the previous update.
UpdateAllocatorRewindable allocator instance for this World.
VersionThe World's current version number

Methods

Method

Description

CompareToCompares this world with another by sequence number, then by version.
GetAllSystemsRetrieve an array of all systems in this world, both unmanaged and managed
GetAllUnmanagedSystemsRetrieve an array of all unmanaged systems in this world
GetExistingSystemStateReturn the system state for an existing instance of a system of type
T
in this World.
GetExistingUnmanagedSystemReturn an existing instance of a system of type
type
in this World. Prefer the version that takes a SystemTypeIndex to avoid unnecessary reflection.
GetSystemTypeIndexGets the SystemTypeIndex for the specified SystemHandle.
GetUnsafeSystemRefResolves the system handle to a reference to its underlying system instantiation.
IsSystemValidChecks whether a system identified by its system handle exists and is in a valid state
ResetUpdateAllocatorManually update the double update allocators. This switches to the other allocator and rewinds the newly switched allocator.
ResolveSystemStateRefResolves the system handle to a reference to its underlying system state.

Operators

Operator

Description

operator ==Whether two references point to the same world.
operator !=Whether two references point to different worlds.