reckfellENGINE

PackedEntityState

Inspect stored Entity, property and connection records.

On this page
class PackedEntityStateReckfellSharpInherits RefCounted

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
# GetBaseSceneState
C#
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.

Returns PackedEntityState

Shared base state or null.

GetConnectionBindsReckfell.Collections.Array
# GetConnectionBinds
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns Reckfell.Collections.Array

New Array of stored bind values.

GetConnectionCountint
# GetConnectionCount
C#
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.

Returns int

Stored connection count, not live subscriber count.

GetConnectionFlagsint
# GetConnectionFlags
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns int

Bitmask or −1 for an invalid index.

GetConnectionMethodStringName
# GetConnectionMethod
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns StringName

Method name or empty for an invalid index.

GetConnectionSignalStringName
# GetConnectionSignal
C#
public StringName GetConnectionSignal(int idx);

Stored source signal name. Metadata rather than an emission or proof that a changed class still exposes that signal.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns StringName

Signal name or empty for an invalid index.

GetConnectionSourceEntityPath
# GetConnectionSource
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns EntityPath

Relative source path, not a live Entity.

GetConnectionTargetEntityPath
# GetConnectionTarget
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns EntityPath

Relative target path, not a live Entity.

GetConnectionUnbindsint
# GetConnectionUnbinds
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Connection index from 0 to GetConnectionCount()−1.

Returns int

Discarded-argument count or −1 for an invalid index.

GetEntityCountint
# GetEntityCount
C#
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.

Returns int

Number of own stored Entity records.

GetEntityGroupsstring[]
# GetEntityGroups
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns string[]

Stored group-name array; may be empty.

GetEntityIndexint
# GetEntityIndex
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns int

Sibling placement or −1; not the record idx.

GetEntityInstancePackedEntity
# GetEntityInstance
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns PackedEntity

Shared referenced PackedEntity or null.

GetEntityInstancePlaceholderstring
# GetEntityInstancePlaceholder
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns string

Placeholder path string or empty.

GetEntityNameStringName
# GetEntityName
C#
public StringName GetEntityName(int idx);

Stored record name, not a globally unique ID or the current Name of a runtime object renamed afterward.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns StringName

Stored StringName name.

GetEntityOwnerPathEntityPath
# GetEntityOwnerPath
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns EntityPath

Relative Owner path; usually empty for the root.

GetEntityPathEntityPath
# GetEntityPath
C#
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.

Parameters
NameTypeDefault
idxint—
forParentboolfalse
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

forParent

True returns the record parent path; false returns the record path.

Returns EntityPath

Relative record or parent path.

GetEntityPropertyCountint
# GetEntityPropertyCount
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns int

Stored property count; −1 for invalid idx.

GetEntityPropertyNameStringName
# GetEntityPropertyName
C#
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.

Parameters
NameTypeDefault
idxint—
propIdxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

propIdx

Property index from 0 to GetEntityPropertyCount(idx)−1, not an Entity index.

Returns StringName

Stored property name or empty StringName.

GetEntityPropertyValueVariant
# GetEntityPropertyValue
C#
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.

Parameters
NameTypeDefault
idxint—
propIdxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

propIdx

Property index from 0 to GetEntityPropertyCount(idx)−1, not an Entity index.

Returns Variant

Owned Variant containing the stored value, possibly Nil.

GetEntityTypeStringName
# GetEntityType
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns StringName

Native class name or empty.

GetPathstring
# GetPath
C#
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.

Returns string

Source resource path or empty.

IsEntityInstancePlaceholderbool
# IsEntityInstancePlaceholder
C#
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.

Parameters
NameTypeDefault
idxint—
idx

Entity record index from 0 to GetEntityCount()−1; not a GetEntityIndex result.

Returns bool

Record flag; invalid indices also yield false with diagnostics.

PackedEntityState.GenEditState

ValueDescription
Disabled = 0

If passed to PackedEntity.Instantiate, blocks edits to the scene state.

Instance = 1

If passed to PackedEntity.Instantiate, provides inherited scene resources to the local scene. Note: Only available in editor builds.

Main = 2

If passed to PackedEntity.Instantiate, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Note: Only available in editor builds.

MainInherited = 3

If passed to PackedEntity.Instantiate, it's similar to PackedEntityState.GenEditState.Main, but for the case where the scene is being instantiated to be the base of another one. Note: Only available in editor builds.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.