PackedEntityState
Inspect stored Entity, property and connection records.
Read PackedEntityState through PackedEntity.GetState(). These are stored records rather than live Entities or a full engine-class property list. Entity, property and connection indices use different ranges; GetEntityIndex() is a separate sibling-placement value.
Resolve relative EntityPaths within the corresponding instantiated hierarchy. Root path is a dot; root parent/Owner paths can be empty. GetEntityType() reports the native class rather than necessarily the C# script name.
State is shared with its owner: repacking or ResetState can change visible records. Returned Variant/Array values require ordinary disposal of owned wrappers; contained shared Resources and Entities do not become independent copies.
Levels and prefabs. Ordinary records and a C# method connection without bound arguments were executed. Positive inheritance/placeholder branches and invalid indices were source-reviewed rather than executed.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Methods23
GetBaseSceneStatePackedEntityState
public PackedEntityState GetBaseSceneState();Returns the base inherited level/prefab state or null when absent. Not an Entity parent or every nested instance state. The positive inheritance branch was source-reviewed without a separate runtime graph.
PackedEntityStateShared base state or null.
GetConnectionBindsReckfell.Collections.Array
public Reckfell.Collections.Array GetConnectionBinds(int idx);Returns a new Array of the stored connection bound arguments. Mutating this container does not rewrite state; nested Resources may still be shared. Not the last signal emission arguments. Dispose the owned C# Array after reading. Empty binds and container independence were tested; a nonempty bind payload was not executed.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
Reckfell.Collections.ArrayNew Array of stored bind values.
GetConnectionCountint
public int GetConnectionCount();Number of stored connection records in this state, not every subscription in the running game. Iterate connection indices from 0 to count−1. Runtime subscriptions without Persist need not be present.
intStored connection count, not live subscriber count.
GetConnectionFlagsint
public int GetConnectionFlags(int idx);Stored connection ConnectFlags bitmask. Test bits rather than treating it as one exclusive value. An invalid index emits native diagnostics and returns −1, which is not a valid mask result.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
intBitmask or −1 for an invalid index.
GetConnectionMethodStringName
public StringName GetConnectionMethod(int idx);Stored target-object method name, not a C# delegate. The name alone proves neither an available method nor a compatible signature after a script change.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
StringNameMethod name or empty for an invalid index.
GetConnectionSignalStringName
public StringName GetConnectionSignal(int idx);Stored source signal name. Metadata rather than an emission or proof that a changed class still exposes that signal.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
StringNameSignal name or empty for an invalid index.
GetConnectionSourceEntityPath
public EntityPath GetConnectionSource(int idx);Relative EntityPath of the stored connection source. Resolve against the corresponding instantiated hierarchy rather than an arbitrary EntityTree.Root. An invalid index yields an empty path and diagnostics.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
EntityPathRelative source path, not a live Entity.
GetConnectionTargetEntityPath
public EntityPath GetConnectionTarget(int idx);Relative EntityPath of the stored connection target. Not a ready live Entity or OS path. Check target availability after creating the appropriate instance.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
EntityPathRelative target path, not a live Entity.
GetConnectionUnbindsint
public int GetConnectionUnbinds(int idx);Number of signal arguments discarded by the connection adapter before invoking the method. Not GetConnectionBinds size. Zero for an ordinary connection without Unbind; an invalid index returns −1 with diagnostics. A nonzero adapter was source-reviewed only.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxConnection index from 0 to GetConnectionCount()−1.
intDiscarded-argument count or −1 for an invalid index.
GetEntityCountint
public int GetEntityCount();Number of this state own stored Entity records. Not a count of all live objects after instantiation: nested/inherited content may use separate references, and descendants with unsuitable Owner may be absent.
intNumber of own stored Entity records.
GetEntityGroupsstring[]
public string[] GetEntityGroups(int idx);Returns a copy of stored group names for the record. Not every temporary runtime group. Mutating the array changes neither state nor a live Entity.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
string[]Stored group-name array; may be empty.
GetEntityIndexint
public int GetEntityIndex(int idx);Stored sibling-placement position, distinct from the state record idx. Can be −1 when no explicit placement is stored; do not use it as an index for other GetEntity methods. An invalid idx also returns −1, with diagnostics.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
intSibling placement or −1; not the record idx.
GetEntityInstancePackedEntity
public PackedEntity GetEntityInstance(int idx);Returns the referenced nested-instance PackedEntity, or the inherited base for the root record. Returns null for an ordinary Entity or placeholder. Instantiates no live hierarchy; this may be a shared resource, so do not Dispose it while state uses it. Positive nested/inherited branches were source-reviewed only.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
PackedEntityShared referenced PackedEntity or null.
GetEntityInstancePlaceholderstring
public string GetEntityInstancePlaceholder(int idx);Returns the path string for a deferred placeholder instance. Empty for an ordinary record. Reading loads/creates no placeholder; a nonempty string proves no available file. The positive placeholder case was not executed here.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
stringPlaceholder path string or empty.
GetEntityNameStringName
public StringName GetEntityName(int idx);Stored record name, not a globally unique ID or the current Name of a runtime object renamed afterward.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
StringNameStored StringName name.
GetEntityOwnerPathEntityPath
public EntityPath GetEntityOwnerPath(int idx);Relative path of the stored Owner, distinct from the parent path. Usually empty for the root; a normal descendant owned by the root returns a dot. Owner controls serialization scope rather than replacing parent/child memory ownership.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
EntityPathRelative Owner path; usually empty for the root.
GetEntityPathEntityPath
public EntityPath GetEntityPath(int idx, bool forParent = false);Builds the record relative path within the hierarchy. Root with forParent=false is a dot; its parent is empty. forParent=true excludes the record own name. Not a file path or proof of a live Entity before Instantiate.
| Name | Type | Default |
|---|---|---|
idx | int | — |
forParent | bool | false |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
forParentTrue returns the record parent path; false returns the record path.
EntityPathRelative record or parent path.
GetEntityPropertyCountint
public int GetEntityPropertyCount(int idx);Number of stored values/overrides for this record. Not the full engine-class property list: default values may be absent. Iterate propIdx separately for each idx.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
intStored property count; −1 for invalid idx.
GetEntityPropertyNameStringName
public StringName GetEntityPropertyName(int idx, int propIdx);Stored property name for an Entity/property index pair. Not an automatically converted C# property name or live-object value resolution. Invalid indices yield an empty StringName with diagnostics.
| Name | Type | Default |
|---|---|---|
idx | int | — |
propIdx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
propIdxProperty index from 0 to GetEntityPropertyCount(idx)−1, not an Entity index.
StringNameStored property name or empty StringName.
GetEntityPropertyValueVariant
public Variant GetEntityPropertyValue(int idx, int propIdx);Returns a stored Variant rather than a created Entity current value. Nil can be valid data; invalid indices also yield Nil with diagnostics. A contained Resource can be shared. Dispose the owned Variant after reading, but do not free borrowed Entities/shared Resources.
| Name | Type | Default |
|---|---|---|
idx | int | — |
propIdx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
propIdxProperty index from 0 to GetEntityPropertyCount(idx)−1, not an Entity index.
VariantOwned Variant containing the stored value, possibly Nil.
GetEntityTypeStringName
public StringName GetEntityType(int idx);Returns the native engine-class name. A C# scripted Entity can report Entity rather than its managed-class name. A nested/inherited record can have an empty type; an invalid index also returns empty with diagnostics.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
StringNameNative class name or empty.
GetPathstring
public string GetPath();Source PackedEntity path propagated to state; empty when unassigned. Not a root-Entity path. Assigning ResourcePath can change it without writing any file.
stringSource resource path or empty.
IsEntityInstancePlaceholderbool
public bool IsEntityInstancePlaceholder(int idx);Checks the stored placeholder flag. False does not guarantee an ordinary native type: the record can reference a nested PackedEntity. Loads no object and checks no file; invalid idx also yields false with diagnostics.
| Name | Type | Default |
|---|---|---|
idx | int | — |
idxEntity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.
boolRecord flag; invalid indices also yield false with diagnostics.
PackedEntityState.GenEditState
| Value | Description |
|---|---|
Disabled = 0 | If passed to |
Instance = 1 | If passed to |
Main = 2 | If passed to |
MainInherited = 3 | If passed to |