Entity
The base entity in a level or prefab hierarchy.
Entity stores a name, Parent, child entities and a script. It is an object hierarchy, not an ECS identifier or component array. Use Entity2D/Entity3D for spatial position. Parent defines hierarchy and child deletion; Owner identifies the saved tree and scopes %Name lookup. AddChild does not assign Owner automatically.
_EnterTree repeats on entry; ordinary _Ready runs once after children are ready. RequestReady requests it for only this Entity next entry. _ExitTree is suitable for disconnecting external handlers. ProcessMode controls ordinary processing without blocking direct methods or signals.
Tree packing · Lookup and name scopes.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
EntityConstructor
public Entity();Properties14
AutoTranslateModeProperty
public Entity.AutoTranslateModeEnum AutoTranslateMode { get; set; }Defines if any text should automatically change to its translated version depending on the current locale (for entities such as Label, RichTextLabel, Window, etc.). Also decides if the entity's strings should be parsed for translation template generation.
Note: For the root entity, auto translate mode can also be set via ProjectSettings.internationalization/rendering/root_node_auto_translate.
EditorDescriptionProperty
public string EditorDescription { get; set; }An optional description to the entity. It will be displayed as a tooltip when hovering over the entity in the editor's Scene dock.
MultiplayerProperty
public MultiplayerApi Multiplayer { get; }The MultiplayerApi instance associated with this entity. See EntityTree.GetMultiplayer.
Note: Renaming the entity, or moving it in the tree, will not move the MultiplayerApi to the new path, you will have to update this manually.
NameProperty
public StringName Name { get; set; }The name of the entity. This name must be unique among the siblings (other child entities from the same parent). When set to an existing sibling's name, the entity is automatically renamed.
Note: When changing the name, the following characters will be replaced with an underscore: (. : @ / " %). In particular, the @ character is reserved for auto-generated names. See also String.validate_node_name.
OwnerProperty
public Entity Owner { get; set; }Owner of a saved hierarchy, not a parent or reference counter. A non-null owner must be an ancestor; assign after AddChild. AddChild itself does not assign Owner, so a programmatically added child may be absent from PackedEntity.Pack.
PhysicsInterpolationModeProperty
public Entity.PhysicsInterpolationModeEnum PhysicsInterpolationMode { get; set; }Local Inherit/On/Off mode, used with the globally enabled interpolation system. Off does not cancel the spatial contribution of an interpolated parent.
ProcessModeProperty
public Entity.ProcessModeEnum ProcessMode { get; set; }Controls ordinary processing under pause/disable. Inherit follows Parent, not Owner. Does not block direct methods or signals.
ProcessPhysicsPriorityProperty
public int ProcessPhysicsPriority { get; set; }Similar to Entity.ProcessPriority but for Entity.NotificationPhysicsProcess, Entity._PhysicsProcess, or Entity.NotificationInternalPhysicsProcess.
ProcessPriorityProperty
public int ProcessPriority { get; set; }The entity's execution order of the process callbacks (Entity._Process, Entity.NotificationProcess, and Entity.NotificationInternalProcess). entities whose priority value is lower call their process callbacks first, regardless of tree order.
ProcessThreadGroupProperty
public Entity.ProcessThreadGroupEnum ProcessThreadGroup { get; set; }Set the process thread group for this entity (basically, whether it receives Entity.NotificationProcess, Entity.NotificationPhysicsProcess, Entity._Process or Entity._PhysicsProcess (and the internal versions) on the main thread or in a sub-thread.
By default, the thread group is Entity.ProcessThreadGroupEnum.Inherit, which means that this entity belongs to the same thread group as the parent entity. The thread groups means that entities in a specific thread group will process together, separate to other thread groups (depending on Entity.ProcessThreadGroupOrder). If the value is set is Entity.ProcessThreadGroupEnum.SubThread, this thread group will occur on a sub thread (not the main thread), otherwise if set to Entity.ProcessThreadGroupEnum.MainThread it will process on the main thread. If there is not a parent or grandparent entity set to something other than inherit, the entity will belong to the default thread group. This default group will process on the main thread and its group order is 0.
During processing in a sub-thread, accessing most functions in entities outside the thread group is forbidden (and it will result in an error in debug mode). Use ReckfellObject.CallDeferred, Entity.CallThreadSafe, Entity.CallDeferredThreadGroup and the likes in order to communicate from the thread groups to the main thread (or to other thread groups).
To better understand process thread groups, the idea is that any entity set to any other value than Entity.ProcessThreadGroupEnum.Inherit will include any child (and grandchild) entities set to inherit into its process thread group. This means that the processing of all the entities in the group will happen together, at the same time as the entity including them.
ProcessThreadGroupOrderProperty
public int ProcessThreadGroupOrder { get; set; }Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of entities process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example.
ProcessThreadMessagesProperty
public Entity.ProcessThreadMessagesEnum ProcessThreadMessages { get; set; }Set whether the current thread group will process messages (calls to Entity.CallDeferredThreadGroup on threads), and whether it wants to receive them during regular process or physics process callbacks.
SourceAssetPathProperty
public string SourceAssetPath { get; set; }The logical source path of a loaded PackedEntity root. It is not each descendant path or a separate Entity class. It can be empty for a new Entity tree.
UniqueNameInOwnerProperty
public bool UniqueNameInOwner { get; set; }Registers a name for %Name lookup in an Owner scope. This is not global uniqueness, a file UID or a network ID.
Methods145
AddChildvoid
public void AddChild(Entity node, bool forceReadableName = false, Entity.InternalMode @internal = Entity.InternalMode.Disabled);Attaches an Entity as a child. It must not have another parent. If this parent is already in the active tree, child entry and readiness can run before the call returns: set initial properties first. Does not automatically assign Owner.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
forceReadableName | bool | false |
internal | Entity.InternalMode | Entity.InternalMode.Disabled |
nodeCreated Entity without a parent; not this object or an ancestor that would create a cycle. Use Reparent or explicit detachment when changing parents.
forceReadableNameWhen true, requests a readable child name. Names still need to be unique among siblings; this option is not a persistent object identifier.
internalInternal-child mode. Leave Disabled for ordinary gameplay objects; internal children differ in inclusion in ordinary child enumeration.
AddSiblingvoid
public void AddSibling(Entity sibling, bool forceReadableName = false);Adds a sibling entity to this entity's parent, and moves the added sibling right below this entity.
If force_readable_name is true, improves the readability of the added sibling. If not named, the sibling is renamed to its type, and if it shares Entity.Name with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to false, which assigns a dummy name featuring @ in both situations.
Use Entity.AddChild instead of this method if you don't need the child entity to be added below a specific entity in the list of children.
Note: If this entity is internal, the added sibling will be internal too (see Entity.AddChild's internal parameter).
| Name | Type | Default |
|---|---|---|
sibling | Entity | — |
forceReadableName | bool | false |
AddToGroupvoid
public void AddToGroup(StringName group, bool persistent = false);Adds a group tag. Before entry IsInGroup is already true but tree queries do not yet include it. persistent enables PackedEntity serialization; repeated addition does not change that flag.
| Name | Type | Default |
|---|---|---|
group | StringName | — |
persistent | bool | false |
Atrstring
public string Atr(string message, StringName context = null);Translates a message, using the translation catalogs configured in the Project Settings. Further context can be specified to help with the translation. Note that most Control entities automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text.
This method works the same as ReckfellObject.Tr, with the addition of respecting the Entity.AutoTranslateMode state.
If ReckfellObject.CanTranslateMessages is false, or no translation is available, this method returns the message without changes. See ReckfellObject.SetMessageTranslation.
For detailed examples, see Internationalizing games.
| Name | Type | Default |
|---|---|---|
message | string | — |
context | StringName | null |
stringAtrNstring
public string AtrN(string message, StringName pluralMessage, int n, StringName context = null);Translates a message or plural_message, using the translation catalogs configured in the Project Settings. Further context can be specified to help with the translation.
This method works the same as ReckfellObject.TrN, with the addition of respecting the Entity.AutoTranslateMode state.
If ReckfellObject.CanTranslateMessages is false, or no translation is available, this method returns message or plural_message, without changes. See ReckfellObject.SetMessageTranslation.
The n is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language.
For detailed examples, see Localization using gettext.
Note: Negative and Entity.Atr.
| Name | Type | Default |
|---|---|---|
message | string | — |
pluralMessage | StringName | — |
n | int | — |
context | StringName | null |
stringCallDeferredThreadGroup2 overloads
public Variant CallDeferredThreadGroup(StringName method, params Variant[] args);This function is similar to ReckfellObject.CallDeferred except that the call will take place when the entity thread group is processed. If the entity thread group processes in sub-threads, then the call will be done on that thread, right before Entity.NotificationProcess or Entity.NotificationPhysicsProcess, the Entity._Process or Entity._PhysicsProcess or their internal versions are called.
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | Variant[] | — |
Variantpublic Variant CallDeferredThreadGroup(StringName method, ReadOnlySpan<Variant> args);This function is similar to ReckfellObject.CallDeferred except that the call will take place when the entity thread group is processed. If the entity thread group processes in sub-threads, then the call will be done on that thread, right before Entity.NotificationProcess or Entity.NotificationPhysicsProcess, the Entity._Process or Entity._PhysicsProcess or their internal versions are called.
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | ReadOnlySpan<Variant> | — |
VariantCallThreadSafe2 overloads
public Variant CallThreadSafe(StringName method, params Variant[] args);This function ensures that the calling of this function will succeed, no matter whether it's being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly.
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | Variant[] | — |
Variantpublic Variant CallThreadSafe(StringName method, ReadOnlySpan<Variant> args);This function ensures that the calling of this function will succeed, no matter whether it's being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly.
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | ReadOnlySpan<Variant> | — |
VariantCanAutoTranslatebool
public bool CanAutoTranslate();Returns true if this entity can automatically translate messages depending on the current locale. See Entity.AutoTranslateMode, Entity.Atr, and Entity.AtrN.
boolCanProcessbool
public bool CanProcess();Checks active-tree membership and current processing eligibility/ProcessMode. Differs from the IsProcessing flag.
boolCreateTweenTween
public Tween CreateTween();Creates a Tween through the available EntityTree and binds it to this entity. Animation pauses while the entity is outside the tree and is killed when the entity is freed. Tree exit alone does not restore animated properties to their initial values. Create a new Tween for a new independent run instead of reusing a finished or killed one.
TweenDuplicateEntity
public Entity Duplicate(int flags = 15);Duplicates the entity, returning a new entity with all of its properties, signals, groups, and children copied from the original, recursively. The behavior can be tweaked through the flags (see Entity.DuplicateFlags). Internal entities are not duplicated.
Note: For entities with a Script attached, if Object._init has been defined with required parameters, the duplicated entity will not have a Script.
Note: By default, this method will duplicate only properties marked for serialization (i.e. using PropertyUsageFlags.Storage, or in C#, Entity.DuplicateFlags.InternalState.
| Name | Type | Default |
|---|---|---|
flags | int | 15 |
EntityFindChildEntity
public Entity FindChild(string pattern, bool recursive = true, bool owned = true);Finds the first descendant of this entity whose Entity.Name matches pattern, returning null if no match is found. The matching is done against entity names, not their paths, through String.match. As such, it is case-sensitive, "*" matches zero or more characters, and "?" matches any single character.
If recursive is false, only this entity's direct children are checked. entities are checked in tree order, so this entity's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see internal parameter in Entity.AddChild).
If owned is true, only descendants with a valid Entity.Owner entity are checked.
Note: This method can be very slow. Consider storing a reference to the found entity in a variable. Alternatively, use Entity.GetEntity with unique names (see Entity.UniqueNameInOwner).
Note: To find all descendant entities matching a pattern or a class type, see Entity.FindChildren.
| Name | Type | Default |
|---|---|---|
pattern | string | — |
recursive | bool | true |
owned | bool | true |
EntityFindChildrenReckfell.Collections.Array<Entity>
public Reckfell.Collections.Array<Entity> FindChildren(string pattern, string type = "", bool recursive = true, bool owned = true);Finds all descendants of this entity whose names match pattern, returning an empty Reckfell.Collections.Array if no match is found. The matching is done against entity names, not their paths, through String.match. As such, it is case-sensitive, "*" matches zero or more characters, and "?" matches any single character.
If type is not empty, only descendants inheriting from type are included (see ReckfellObject.IsClass).
If recursive is false, only this entity's direct children are checked. entities are checked in tree order, so this entity's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see internal parameter in Entity.AddChild).
If owned is true, only descendants with a valid Entity.Owner entity are checked.
Note: This method can be very slow. Consider storing references to the found entities in a variable.
Note: To find a single descendant entity matching a pattern, see Entity.FindChild.
| Name | Type | Default |
|---|---|---|
pattern | string | — |
type | string | "" |
recursive | bool | true |
owned | bool | true |
Reckfell.Collections.Array<Entity>FindParentEntity
public Entity FindParent(string pattern);Finds the first ancestor of this entity whose Entity.Name matches pattern, returning null if no match is found. The matching is done through String.match. As such, it is case-sensitive, "*" matches zero or more characters, and "?" matches any single character. See also Entity.FindChild and Entity.FindChildren.
Note: As this method walks upwards in the scene tree, it can be slow in large, deeply nested entities. Consider storing a reference to the found entity in a variable. Alternatively, use Entity.GetEntity with unique names (see Entity.UniqueNameInOwner).
| Name | Type | Default |
|---|---|---|
pattern | string | — |
EntityGetAccessibilityElementRid
public Rid GetAccessibilityElement();Returns main accessibility element RID.
Note: This method should be called only during accessibility information updates (Entity.NotificationAccessibilityUpdate).
RidGetAutoTranslateModeEntity.AutoTranslateModeEnum
public Entity.AutoTranslateModeEnum GetAutoTranslateMode();Entity.AutoTranslateModeEnumGetChild2 overloads
public Entity GetChild(int idx, bool includeInternal = false);Fetches a child entity by its index. Each child entity has an index relative to its siblings (see Entity.GetIndex). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with Entity.GetChildCount to iterate over this entity's children. If no child exists at the given index, this method returns null and an error is generated.
If include_internal is false, internal children are ignored (see Entity.AddChild's internal parameter).
Note: To fetch a entity by EntityPath, use Entity.GetEntity.
| Name | Type | Default |
|---|---|---|
idx | int | — |
includeInternal | bool | false |
Entitypublic T GetChild<T>(int idx, bool includeInternal = false) where T : class;Fetches a child entity by its index. Each child entity has an index relative to its siblings (see Entity.GetIndex). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with Entity.GetChildCount to iterate over this entity's children. If no child exists at the given index, this method returns null and an error is generated.
If include_internal is false, internal children are ignored (see Entity.AddChild's internal parameter).
Note: To fetch a entity by EntityPath, use Entity.GetEntity.
| Name | Type | Default |
|---|---|---|
idx | int | — |
includeInternal | bool | false |
idxChild index.
includeInternalIf false, internal children are skipped (see internal
parameter in Entity.AddChild).
GetChildCountint
public int GetChildCount(bool includeInternal = false);Returns the number of children of this entity.
If include_internal is false, internal children are not counted (see Entity.AddChild's internal parameter).
| Name | Type | Default |
|---|---|---|
includeInternal | bool | false |
intGetChildOrNullT
public T GetChildOrNull<T>(int idx, bool includeInternal = false) where T : class;Returns a child entity by its index (see Entity.GetChildCount).
This method is often used for iterating all children of a entity.
Negative indices access the children from the last one.
To access a child entity via its name, use Entity.GetEntity.
| Name | Type | Default |
|---|---|---|
idx | int | — |
includeInternal | bool | false |
idxChild index.
includeInternalIf false, internal children are skipped (see internal
parameter in Entity.AddChild).
GetChildrenReckfell.Collections.Array<Entity>
public Reckfell.Collections.Array<Entity> GetChildren(bool includeInternal = false);Returns all children of this entity inside an Reckfell.Collections.Array.
If include_internal is false, excludes internal children from the returned array (see Entity.AddChild's internal parameter).
| Name | Type | Default |
|---|---|---|
includeInternal | bool | false |
Reckfell.Collections.Array<Entity>GetEditorDescriptionstring
public string GetEditorDescription();stringGetEntity2 overloads
public Entity GetEntity(EntityPath path);Returns an entity at a path relative to this entity. An absolute path starts at /root and requires this entity to be inside the tree. A missing path reports an engine error and returns null. Use GetEntityOrNull() for an optional reference.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
Entitypublic T GetEntity<T>(EntityPath path) where T : class;Looks up an entity by path and casts the result to T. A missing path reports an engine error; an incompatible type throws InvalidCastException. Use this overload when the prefab structure is known. For an optional entity or a type check, use GetEntityOrNull<T>().
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
pathThe path to the entity to fetch.
GetEntityAndResourceReckfell.Collections.Array
public Reckfell.Collections.Array GetEntityAndResource(EntityPath path);Fetches a entity and its most nested resource as specified by the EntityPath's subname. Returns an Reckfell.Collections.Array of size 3 where:
- Element
0is theEntity, ornullif not found; - Element
1is the subname's last nestedResource, ornullif not found; - Element
2is the remainingEntityPath, referring to an existing, non-Resourceproperty (seeReckfellObject.GetIndexed). Example: Assume that the child'sSprite2D.Texturehas been assigned anAtlasTexture:
var a = GetEntityAndResource(EntityPath("Area2D/Sprite2D"));
ReckfellApi.Print(a[0].Name); // Prints Sprite2D
ReckfellApi.Print(a[1]); // Prints <null>
ReckfellApi.Print(a[2]); // Prints ^"
var b = GetEntityAndResource(EntityPath("Area2D/Sprite2D:texture:atlas"));
ReckfellApi.Print(b[0].name); // Prints Sprite2D
ReckfellApi.Print(b[1].get_class()); // Prints AtlasTexture
ReckfellApi.Print(b[2]); // Prints ^""
var c = GetEntityAndResource(EntityPath("Area2D/Sprite2D:texture:atlas:region"));
ReckfellApi.Print(c[0].name); // Prints Sprite2D
ReckfellApi.Print(c[1].get_class()); // Prints AtlasTexture
ReckfellApi.Print(c[2]); // Prints ^":region"| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
Reckfell.Collections.ArrayGetEntityOrNull2 overloads
public Entity GetEntityOrNull(EntityPath path);Returns the path target or null. A generic type mismatch also returns null. Check the %Name scope and expected class.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
Entitypublic T GetEntityOrNull<T>(EntityPath path) where T : class;Returns the path target or null. A generic type mismatch also returns null. Check the %Name scope and expected class.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
pathThe path to the entity to fetch.
GetEntityRpcConfigVariant
public Variant GetEntityRpcConfig();Returns a Reckfell.Collections.Dictionary mapping method names to their RPC configuration defined for this entity using Entity.RpcConfig.
Note: This method only returns the RPC configuration assigned via Entity.RpcConfig. See Script.GetRpcConfig to retrieve the RPCs defined by the Script.
VariantGetGroupsReckfell.Collections.Array<StringName>
public Reckfell.Collections.Array<StringName> GetGroups();Returns an Reckfell.Collections.Array of group names that the entity has been added to.
Note: To improve performance, the order of group names is not guaranteed and may vary between project runs. Therefore, do not rely on the group order.
Note: This method may also return some group names starting with an underscore (_). These are internally used by the engine. To avoid conflicts, do not use custom groups starting with underscores. To exclude internal groups, see the following code snippet:
// Stores the node's non-internal groups only (as a List of StringNames).
List<string> nonInternalGroups = new List<string>();
foreach (string group in GetGroups())
{
if (!group.BeginsWith("_"))
nonInternalGroups.Add(group);
}Reckfell.Collections.Array<StringName>GetIndexint
public int GetIndex(bool includeInternal = false);Returns this entity's order among its siblings. The first entity's index is 0. See also Entity.GetChild.
If include_internal is false, returns the index ignoring internal children. The first, non-internal child will have an index of 0 (see Entity.AddChild's internal parameter).
| Name | Type | Default |
|---|---|---|
includeInternal | bool | false |
intGetLastExclusiveWindowWindow
public Window GetLastExclusiveWindow();Returns the Window that contains this entity, or the last exclusive child in a chain of windows starting with the one that contains this entity.
WindowGetMultiplayerMultiplayerApi
public MultiplayerApi GetMultiplayer();MultiplayerApiGetMultiplayerAuthorityint
public int GetMultiplayerAuthority();Returns the peer ID of the multiplayer authority for this entity. See Entity.SetMultiplayerAuthority.
intGetNameStringName
public StringName GetName();StringNameGetOrphanEntityIdsReckfell.Collections.Array<int>
public static Reckfell.Collections.Array<int> GetOrphanEntityIds();Returns object IDs of all orphan entities (entities outside the EntityTree). Used for debugging.
Note: Entity.GetOrphanEntityIds only works in debug builds. When called in a project exported in release mode, Entity.GetOrphanEntityIds will return an empty array.
Reckfell.Collections.Array<int>GetOwner2 overloads
public Entity GetOwner();Entitypublic T GetOwner<T>() where T : class;The entity owner. A entity can have any other entity as owner (as long as it is
a valid parent, grandparent, etc. ascending in the tree). When saving a
entity (using PackedEntity), all the entities it owns will be saved
with it. This allows for the creation of complex EntityTrees,
with instancing and subinstancing.
GetOwnerOrNullT
public T GetOwnerOrNull<T>() where T : class;The entity owner. A entity can have any other entity as owner (as long as it is
a valid parent, grandparent, etc. ascending in the tree). When saving a
entity (using PackedEntity), all the entities it owns will be saved
with it. This allows for the creation of complex EntityTrees,
with instancing and subinstancing.
GetParent2 overloads
public Entity GetParent();Reads the direct hierarchy parent. Parent is distinct from Owner: parenthood controls the tree and lifetime, while Owner participates in saving.
EntityParent Entity or null when none exists, for example after RemoveChild. Having no parent does not itself mean deletion.
public T GetParent<T>() where T : class;Returns this entity's parent entity, or null if the entity doesn't have a parent.
GetParentOrNullT
public T GetParentOrNull<T>() where T : class;Returns the parent entity of the current entity, or a null instance
if the entity lacks a parent.
GetPathEntityPath
public EntityPath GetPath();Returns the entity's absolute path, relative to the EntityTree.Root. If the entity is not inside the scene tree, this method fails and returns an empty EntityPath.
EntityPathGetPathToEntityPath
public EntityPath GetPathTo(Entity node, bool useUniquePath = false);Returns the relative EntityPath from this entity to the specified entity. Both entities must be in the same EntityTree or scene hierarchy, otherwise this method fails and returns an empty EntityPath.
If use_unique_path is true, returns the shortest path accounting for this entity's unique name (see Entity.UniqueNameInOwner).
Note: If you get a relative path which starts from a unique entity, the path may be longer than a normal relative path, due to the addition of the unique entity's name.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
useUniquePath | bool | false |
EntityPathGetPhysicsInterpolationModeEntity.PhysicsInterpolationModeEnum
public Entity.PhysicsInterpolationModeEnum GetPhysicsInterpolationMode();Entity.PhysicsInterpolationModeEnumGetPhysicsProcessDeltaTimedouble
public double GetPhysicsProcessDeltaTime();The physics-step duration in game time. Respect method semantics: MoveAndSlide integrates Velocity itself; MoveAndCollide takes displacement.
doubleGetPhysicsProcessPriorityint
public int GetPhysicsProcessPriority();intGetProcessDeltaTimedouble
public double GetProcessDeltaTime();The last ordinary processing-step duration in game-time seconds. Not a separate wall clock; normally use the supplied delta inside _Process.
doubleGetProcessModeEntity.ProcessModeEnum
public Entity.ProcessModeEnum GetProcessMode();Entity.ProcessModeEnumGetProcessPriorityint
public int GetProcessPriority();intGetProcessThreadGroupEntity.ProcessThreadGroupEnum
public Entity.ProcessThreadGroupEnum GetProcessThreadGroup();Entity.ProcessThreadGroupEnumGetProcessThreadGroupOrderint
public int GetProcessThreadGroupOrder();intGetProcessThreadMessagesEntity.ProcessThreadMessagesEnum
public Entity.ProcessThreadMessagesEnum GetProcessThreadMessages();Entity.ProcessThreadMessagesEnumGetSceneInstanceLoadPlaceholderbool
public bool GetSceneInstanceLoadPlaceholder();Returns true if this entity is an instance load placeholder. See InstancePlaceholder and Entity.SetSceneInstanceLoadPlaceholder.
boolGetSourceAssetPathstring
public string GetSourceAssetPath();stringGetTreeEntityTree
public EntityTree GetTree();Gets this Entity's active tree. Check IsInsideTree first for an off-tree object; this method does not attach it automatically.
EntityTreeEntityTree while inside the tree. Outside the tree the native implementation reports an error and returns null.
GetTreeStringstring
public string GetTreeString();Returns the tree as a string. Used mainly for debugging purposes. This version displays the path relative to the current entity, and is good for copy/pasting into the Entity.GetEntity function. It also can be used in game UI/UX.
May print, for example:
TheGame
TheGame/Menu
TheGame/Menu/Label
TheGame/Menu/Camera2D
TheGame/SplashScreen
TheGame/SplashScreen/Camera2DstringGetTreeStringPrettystring
public string GetTreeStringPretty();Similar to Entity.GetTreeString, this returns the tree as a string. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.
May print, for example:
┖╴TheGame
┠╴Menu
┃ ┠╴Label
┃ ┖╴Camera2D
┖╴SplashScreen
┖╴Camera2DstringGetViewportViewport
public Viewport GetViewport();Returns the entity's closest Viewport ancestor, if the entity is inside the tree. Otherwise, returns null.
ViewportGetWindowWindow
public Window GetWindow();Returns the Window that contains this entity. If the entity is in the main window, this is equivalent to getting the root entity (get_tree().get_root()).
WindowHasEntitybool
public bool HasEntity(EntityPath path);Returns true if the path points to a valid entity. See also Entity.GetEntity.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
boolHasEntityAndResourcebool
public bool HasEntityAndResource(EntityPath path);Returns true if path points to a valid entity and its subnames point to a valid Resource, e.g. Area2D/CollisionShape2D:shape. Properties that are not Resource types (such as entities or other Variant types) are not considered. See also Entity.GetEntityAndResource.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
boolIsAncestorOfbool
public bool IsAncestorOf(Entity node);Returns true if the given entity is a direct or indirect child of this entity.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
boolIsDisplayedFoldedbool
public bool IsDisplayedFolded();Returns true if the entity is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also Entity.SetDisplayFolded.
boolIsEditableInstancebool
public bool IsEditableInstance(Entity node);Returns true if entity has editable children enabled relative to this entity. This method is intended to be used in editor plugins and tools. See also Entity.SetEditableInstance.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
boolIsEntityReadybool
public bool IsEntityReady();Returns true if the entity is ready, i.e. it's inside scene tree and all its children are initialized.
Entity.RequestReady resets it back to false.
boolIsGreaterThanbool
public bool IsGreaterThan(Entity node);Returns true if the given entity occurs later in the scene hierarchy than this entity. A entity occurring later is usually processed last.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
boolIsInGroupbool
public bool IsInGroup(StringName group);Checks the object membership tag even while detached. Does not prove inclusion in an active-tree query.
| Name | Type | Default |
|---|---|---|
group | StringName | — |
boolIsInsideTreebool
public bool IsInsideTree();Checks membership in an active EntityTree. A newly created or detached object can exist in memory outside the tree. This does not test parent presence or queued deletion.
booltrue when a tree is assigned; false before attachment or after leaving the tree.
IsMultiplayerAuthoritybool
public bool IsMultiplayerAuthority();Returns true if the local system is the multiplayer authority of this entity.
boolIsPartOfEditedScenebool
public bool IsPartOfEditedScene();Returns true if the entity is part of the scene currently opened in the editor.
boolIsPhysicsInterpolatedbool
public bool IsPhysicsInterpolated();Returns true if physics interpolation is enabled for this entity (see Entity.PhysicsInterpolationMode).
Note: Interpolation will only be active if both the flag is set and physics interpolation is enabled within the EntityTree. This can be tested using Entity.IsPhysicsInterpolatedAndEnabled.
boolIsPhysicsInterpolatedAndEnabledbool
public bool IsPhysicsInterpolatedAndEnabled();Returns true if physics interpolation is enabled (see Entity.PhysicsInterpolationMode) and enabled in the EntityTree.
This is a convenience version of Entity.IsPhysicsInterpolated that also checks whether physics interpolation is enabled globally.
See EntityTree.PhysicsInterpolation and ProjectSettings.physics/common/physics_interpolation.
boolIsPhysicsProcessingbool
public bool IsPhysicsProcessing();Reports the physics-callback enabled flag. It does not prove actual execution under current pause/ProcessMode or describe every body's simulation state.
boolIsPhysicsProcessingInternalbool
public bool IsPhysicsProcessingInternal();Returns true if internal physics processing is enabled (see Entity.SetPhysicsProcessInternal).
boolIsProcessingbool
public bool IsProcessing();Reports whether _Process is enabled. True does not guarantee callbacks during pause or under a prohibiting inherited mode.
boolIsProcessingInputbool
public bool IsProcessingInput();Returns true if the entity is processing input (see Entity.SetProcessInput).
boolIsProcessingInternalbool
public bool IsProcessingInternal();Returns true if internal processing is enabled (see Entity.SetProcessInternal).
boolIsProcessingShortcutInputbool
public bool IsProcessingShortcutInput();Returns true if the entity is processing shortcuts (see Entity.SetProcessShortcutInput).
boolIsProcessingUnhandledInputbool
public bool IsProcessingUnhandledInput();Returns true if the entity is processing unhandled input (see Entity.SetProcessUnhandledInput).
boolIsProcessingUnhandledKeyInputbool
public bool IsProcessingUnhandledKeyInput();Returns true if the entity is processing unhandled key input (see Entity.SetProcessUnhandledKeyInput).
boolIsUniqueNameInOwnerbool
public bool IsUniqueNameInOwner();boolMoveChildvoid
public void MoveChild(Entity childNode, int toIndex);Moves child_node to the given index. A entity's index is the order among its siblings. If to_index is negative, the index is counted from the end of the list. See also Entity.GetChild and Entity.GetIndex.
Note: The processing order of several engine callbacks (Entity.Ready, Entity._Process, etc.) and notifications sent through Entity.PropagateNotification is affected by tree order. CanvasItem entities are also rendered in tree order. See also Entity.ProcessPriority.
| Name | Type | Default |
|---|---|---|
childNode | Entity | — |
toIndex | int | — |
NotifyDeferredThreadGroupvoid
public void NotifyDeferredThreadGroup(int what);Similar to Entity.CallDeferredThreadGroup, but for notifications.
| Name | Type | Default |
|---|---|---|
what | int | — |
NotifyThreadSafevoid
public void NotifyThreadSafe(int what);Similar to Entity.CallThreadSafe, but for notifications.
| Name | Type | Default |
|---|---|---|
what | int | — |
PrintOrphanEntitiesvoid
public static void PrintOrphanEntities();Prints all orphan entities (entities outside the EntityTree). Useful for debugging.
Note: This method only works in debug builds. It does nothing in a project exported in release mode.
PrintTreevoid
public void PrintTree();Prints the entity and its children to the console, recursively. The entity does not have to be inside the tree. This method outputs EntityPaths relative to this entity, and is good for copy/pasting into Entity.GetEntity. See also Entity.PrintTreePretty.
May print, for example:
.
Menu
Menu/Label
Menu/Camera2D
SplashScreen
SplashScreen/Camera2DPrintTreePrettyvoid
public void PrintTreePretty();Prints the entity and its children to the console, recursively. The entity does not have to be inside the tree. Similar to Entity.PrintTree, but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees.
May print, for example:
┖╴TheGame
┠╴Menu
┃ ┠╴Label
┃ ┖╴Camera2D
┖╴SplashScreen
┖╴Camera2DPropagateCallvoid
public void PropagateCall(StringName method, Reckfell.Collections.Array args = null, bool parentFirst = false);Calls the given method name, passing args as arguments, on this entity and all of its children, recursively.
If parent_first is true, the method is called on this entity first, then on all of its children. If false, the children's methods are called first.
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | Reckfell.Collections.Array | null |
parentFirst | bool | false |
PropagateNotificationvoid
public void PropagateNotification(int what);Synchronously sends the notification to this Entity, then its descendants. A close notification does not itself terminate the process; a handler may call Quit(). Do not propagate the same notification recursively from its handler.
| Name | Type | Default |
|---|---|---|
what | int | — |
whatNotification identifier, such as (int)NotificationWMCloseRequest. Use the intended notification constant, rather than a process exit code.
QueueAccessibilityUpdatevoid
public void QueueAccessibilityUpdate();Queues an accessibility information update for this entity.
QueueFreevoid
public void QueueFree();Queues deferred native Entity deletion. Children still attached at deletion time are also freed. In the executed check, the object remained valid immediately after the call and disappeared with its child after queue processing. Distinct from RemoveChild.
RemoveChildvoid
public void RemoveChild(Entity node);Detaches a direct child without freeing memory. Leaving the active tree triggers exit events; reattaching the same instance does not automatically repeat _Ready. Retain a reference for reuse or free the object.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
nodeA direct child of this parent. This call rejects an unrelated Entity.
RemoveFromGroupvoid
public void RemoveFromGroup(StringName group);Removes the membership tag and active registration when in a tree. Does not delete the Entity.
| Name | Type | Default |
|---|---|---|
group | StringName | — |
Reparentvoid
public void Reparent(Entity newParent, bool keepGlobalTransform = true);Moves under a new parent. Owner is retained only when it remains a valid ancestor; otherwise saved-tree and unique-name scopes can change.
| Name | Type | Default |
|---|---|---|
newParent | Entity | — |
keepGlobalTransform | bool | true |
ReplaceByvoid
public void ReplaceBy(Entity node, bool keepGroups = false);Replaces this entity by the given entity. All children of this entity are moved to entity.
If keep_groups is true, the entity is added to the same groups that the replaced entity is in (see Entity.AddToGroup).
Warning: The replaced entity is removed from the tree, but it is not deleted. To prevent memory leaks, store a reference to the entity in a variable, or use ReckfellObject.Free.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
keepGroups | bool | false |
RequestReadyvoid
public void RequestReady();Requests _Ready for only this Entity next entry. Neither invokes it immediately nor recursively requests descendants.
ResetPhysicsInterpolationvoid
public void ResetPhysicsInterpolation();Resets branch interpolation history after assigning the final transform, for example when teleporting. Call after the change inside an active tree. It does not clear velocities, contacts or network buffers.
Rpc2 overloads
public Error Rpc(StringName method, params Variant[] args);Sends a remote procedure call request for the given method to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by entities with the same EntityPath, including the exact same Entity.Name. Behavior depends on the RPC configuration for the given method (see Entity.RpcConfig and [annotation @C#.@rpc]). By default, methods are not exposed to RPCs.
May return OK if the call is successful, ERR_INVALID_PARAMETER if the arguments passed in the method do not match, ERR_UNCONFIGURED if the entity's Entity.Multiplayer cannot be fetched (such as when the entity is not inside the tree), ERR_CONNECTION_ERROR if Entity.Multiplayer's connection is not available.
Note: You can only safely use RPCs on clients after you received the MultiplayerApi.ConnectedToServer signal from the MultiplayerApi. You also need to keep track of the connection state, either by the MultiplayerApi signals like MultiplayerApi.ServerDisconnected or by checking (get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED).
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | Variant[] | — |
Errorpublic Error Rpc(StringName method, ReadOnlySpan<Variant> args);Sends a remote procedure call request for the given method to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by entities with the same EntityPath, including the exact same Entity.Name. Behavior depends on the RPC configuration for the given method (see Entity.RpcConfig and [annotation @C#.@rpc]). By default, methods are not exposed to RPCs.
May return OK if the call is successful, ERR_INVALID_PARAMETER if the arguments passed in the method do not match, ERR_UNCONFIGURED if the entity's Entity.Multiplayer cannot be fetched (such as when the entity is not inside the tree), ERR_CONNECTION_ERROR if Entity.Multiplayer's connection is not available.
Note: You can only safely use RPCs on clients after you received the MultiplayerApi.ConnectedToServer signal from the MultiplayerApi. You also need to keep track of the connection state, either by the MultiplayerApi signals like MultiplayerApi.ServerDisconnected or by checking (get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED).
| Name | Type | Default |
|---|---|---|
method | StringName | — |
args | ReadOnlySpan<Variant> | — |
ErrorRpcConfigvoid
public void RpcConfig(StringName method, Variant config);Changes the RPC configuration for the given method. config should either be null to disable the feature (as by default), or a Reckfell.Collections.Dictionary containing the following entries:
rpc_mode: seeMultiplayerApi.RpcMode;transfer_mode: seeMultiplayerPeer.TransferModeEnum;call_local: iftrue, the method will also be called locally;channel: an [int] representing the channel to send the RPC on. Note: In C#, this method corresponds to the [annotation @C#.@rpc] annotation, with various parameters passed (@rpc(any),@rpc(authority)...). See also the high-level multiplayer tutorial.
| Name | Type | Default |
|---|---|---|
method | StringName | — |
config | Variant | — |
RpcId2 overloads
public Error RpcId(long peerId, StringName method, params Variant[] args);Sends a Entity.Rpc to a specific peer identified by peer_id (see MultiplayerPeer.SetTargetPeer).
May return OK if the call is successful, ERR_INVALID_PARAMETER if the arguments passed in the method do not match, ERR_UNCONFIGURED if the entity's Entity.Multiplayer cannot be fetched (such as when the entity is not inside the tree), ERR_CONNECTION_ERROR if Entity.Multiplayer's connection is not available.
| Name | Type | Default |
|---|---|---|
peerId | long | — |
method | StringName | — |
args | Variant[] | — |
Errorpublic Error RpcId(long peerId, StringName method, ReadOnlySpan<Variant> args);Sends a Entity.Rpc to a specific peer identified by peer_id (see MultiplayerPeer.SetTargetPeer).
May return OK if the call is successful, ERR_INVALID_PARAMETER if the arguments passed in the method do not match, ERR_UNCONFIGURED if the entity's Entity.Multiplayer cannot be fetched (such as when the entity is not inside the tree), ERR_CONNECTION_ERROR if Entity.Multiplayer's connection is not available.
| Name | Type | Default |
|---|---|---|
peerId | long | — |
method | StringName | — |
args | ReadOnlySpan<Variant> | — |
ErrorSetAutoTranslateModevoid
public void SetAutoTranslateMode(Entity.AutoTranslateModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | Entity.AutoTranslateModeEnum | — |
SetDeferredThreadGroupvoid
public void SetDeferredThreadGroup(StringName property, Variant value);Similar to Entity.CallDeferredThreadGroup, but for setting properties.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
value | Variant | — |
SetDisplayFoldedvoid
public void SetDisplayFolded(bool fold);If set to true, the entity appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also Entity.IsDisplayedFolded.
| Name | Type | Default |
|---|---|---|
fold | bool | — |
SetEditableInstancevoid
public void SetEditableInstance(Entity node, bool isEditable);Set to true to allow all entities owned by entity to be available, and editable, in the Scene dock, even if their Entity.Owner is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also Entity.IsEditableInstance.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
isEditable | bool | — |
SetEditorDescriptionvoid
public void SetEditorDescription(string editorDescription);| Name | Type | Default |
|---|---|---|
editorDescription | string | — |
SetMultiplayerAuthorityvoid
public void SetMultiplayerAuthority(int id, bool recursive = true);Assigns authority to a peer for this Entity and optionally descendants. Does not itself synchronize that assignment across peers or authenticate an account.
| Name | Type | Default |
|---|---|---|
id | int | — |
recursive | bool | true |
SetNamevoid
public void SetName(StringName name);| Name | Type | Default |
|---|---|---|
name | StringName | — |
SetOwnervoid
public void SetOwner(Entity owner);Assigns an ancestor as saved-tree owner. Call after attaching to the hierarchy; do not assign self or overwrite nested-prefab scopes.
| Name | Type | Default |
|---|---|---|
owner | Entity | — |
SetPhysicsInterpolationModevoid
public void SetPhysicsInterpolationMode(Entity.PhysicsInterpolationModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | Entity.PhysicsInterpolationModeEnum | — |
SetPhysicsProcessvoid
public void SetPhysicsProcess(bool enable);Toggles this object's _PhysicsProcess separately from its ordinary callback. Disabling it does not remove a body from its physics world or clear its collisions.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetPhysicsProcessInternalvoid
public void SetPhysicsProcessInternal(bool enable);If set to true, enables internal physics for this entity. Internal physics processing happens in isolation from the normal Entity._PhysicsProcess calls and is used by some entities internally to guarantee proper functioning even if the entity is paused or physics processing is disabled for scripting (Entity.SetPhysicsProcess).
Warning: Built-in entities rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetPhysicsProcessPriorityvoid
public void SetPhysicsProcessPriority(int priority);| Name | Type | Default |
|---|---|---|
priority | int | — |
SetProcessvoid
public void SetProcess(bool enable);Toggles this object's ordinary _Process separately from _PhysicsProcess. It does not automatically disconnect every child signal; pause/ProcessMode also affect actual execution.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetProcessInputvoid
public void SetProcessInput(bool enable);If set to true, enables input processing.
Note: If Entity._Input is overridden, this will be automatically enabled before Entity.Ready is called. Input processing is also already enabled for GUI controls, such as Button and TextEdit.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetProcessInternalvoid
public void SetProcessInternal(bool enable);If set to true, enables internal processing for this entity. Internal processing happens in isolation from the normal Entity._Process calls and is used by some entities internally to guarantee proper functioning even if the entity is paused or processing is disabled for scripting (Entity.SetProcess).
Warning: Built-in entities rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetProcessModevoid
public void SetProcessMode(Entity.ProcessModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | Entity.ProcessModeEnum | — |
SetProcessPriorityvoid
public void SetProcessPriority(int priority);| Name | Type | Default |
|---|---|---|
priority | int | — |
SetProcessShortcutInputvoid
public void SetProcessShortcutInput(bool enable);If set to true, enables shortcut processing for this entity.
Note: If Entity._ShortcutInput is overridden, this will be automatically enabled before Entity.Ready is called.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetProcessThreadGroupvoid
public void SetProcessThreadGroup(Entity.ProcessThreadGroupEnum mode);| Name | Type | Default |
|---|---|---|
mode | Entity.ProcessThreadGroupEnum | — |
SetProcessThreadGroupOrdervoid
public void SetProcessThreadGroupOrder(int order);| Name | Type | Default |
|---|---|---|
order | int | — |
SetProcessThreadMessagesvoid
public void SetProcessThreadMessages(Entity.ProcessThreadMessagesEnum flags);| Name | Type | Default |
|---|---|---|
flags | Entity.ProcessThreadMessagesEnum | — |
SetProcessUnhandledInputvoid
public void SetProcessUnhandledInput(bool enable);If set to true, enables unhandled input processing. It enables the entity to receive all input that was not previously handled (usually by a Control).
Note: If Entity._UnhandledInput is overridden, this will be automatically enabled before Entity.Ready is called. Unhandled input processing is also already enabled for GUI controls, such as Button and TextEdit.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetProcessUnhandledKeyInputvoid
public void SetProcessUnhandledKeyInput(bool enable);If set to true, enables unhandled key input processing.
Note: If Entity._UnhandledKeyInput is overridden, this will be automatically enabled before Entity.Ready is called.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetSceneInstanceLoadPlaceholdervoid
public void SetSceneInstanceLoadPlaceholder(bool loadPlaceholder);If set to true, the entity becomes an InstancePlaceholder when packed and instantiated from a PackedEntity. See also Entity.GetSceneInstanceLoadPlaceholder.
| Name | Type | Default |
|---|---|---|
loadPlaceholder | bool | — |
SetSourceAssetPathvoid
public void SetSourceAssetPath(string sourceAssetPath);| Name | Type | Default |
|---|---|---|
sourceAssetPath | string | — |
SetThreadSafevoid
public void SetThreadSafe(StringName property, Variant value);Similar to Entity.CallThreadSafe, but for setting properties.
| Name | Type | Default |
|---|---|---|
property | StringName | — |
value | Variant | — |
SetTranslationDomainInheritedvoid
public void SetTranslationDomainInherited();Makes this entity inherit the translation domain from its parent entity. If this entity has no parent, the main translation domain will be used.
This is the default behavior for all entities. Calling ReckfellObject.SetTranslationDomain disables this behavior.
SetUniqueNameInOwnervoid
public void SetUniqueNameInOwner(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
UpdateConfigurationWarningsvoid
public void UpdateConfigurationWarnings();Refreshes the warnings displayed for this entity in the Scene dock. Use Entity._GetConfigurationWarnings to customize the warning messages to display.
_EnterTreevoid
public virtual void _EnterTree();Called on every active-tree entry before ordinary child entry. Suitable for subscription paired with _ExitTree disconnection.
_ExitTreevoid
public virtual void _ExitTree();Called on exit after children. Disconnect external handlers; exit does not necessarily mean object deletion.
_GetAccessibilityConfigurationWarningsstring[]
public virtual string[] _GetAccessibilityConfigurationWarnings();The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a tool script, and accessibility warnings are enabled in the editor settings.
Returning an empty array produces no warnings.
string[]_GetConfigurationWarningsstring[]
public virtual string[] _GetConfigurationWarnings();The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a tool script.
Returning an empty array produces no warnings.
Call Entity.UpdateConfigurationWarnings when the warnings need to be updated for this entity.
string[]_GetFocusedAccessibilityElementRid
public virtual Rid _GetFocusedAccessibilityElement();Called during accessibility information updates to determine the currently focused sub-element, should return a sub-element RID or the value returned by Entity.GetAccessibilityElement.
Rid_Inputvoid
public virtual void _Input(InputEvent @event);Called when there is an input event. The input event propagates up through the entity tree until a entity consumes it.
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with Entity.SetProcessInput.
To consume the input event and stop it propagating further to other entities, Viewport.SetInputAsHandled can be called.
For gameplay input, Entity._UnhandledInput and Entity._UnhandledKeyInput are usually a better fit as they allow the GUI to intercept the events first.
Note: This method is only called if the entity is present in the scene tree (i.e. if it's not an orphan).
| Name | Type | Default |
|---|---|---|
event | InputEvent | — |
_PhysicsProcessvoid
public virtual void _PhysicsProcess(double delta);Called at the fixed physics step. delta is the step duration in seconds. Update CharacterBody2D or CharacterBody3D velocity and call MoveAndSlide() here. The physics tick rate is configured in project settings and is independent of the rendering frame rate.
| Name | Type | Default |
|---|---|---|
delta | double | — |
_Processvoid
public virtual void _Process(double delta);Called every rendered frame when processing is enabled. delta is the elapsed time in seconds. Multiply a speed by delta to keep motion independent of the frame rate. Perform physics movement in _PhysicsProcess().
| Name | Type | Default |
|---|---|---|
delta | double | — |
_Readyvoid
public virtual void _Ready();Called after ordinary children are ready; without RequestReady it does not automatically repeat on reentry. Does not promise readiness of future objects or external services.
_ShortcutInputvoid
public virtual void _ShortcutInput(InputEvent @event);Called when an InputEventKey, InputEventShortcut, or InputEventJoypadButton hasn't been consumed by Entity._Input or any GUI Control item. It is called before Entity._UnhandledKeyInput and Entity._UnhandledInput. The input event propagates up through the entity tree until a entity consumes it.
It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with Entity.SetProcessShortcutInput.
To consume the input event and stop it propagating further to other entities, Viewport.SetInputAsHandled can be called.
This method can be used to handle shortcuts. For generic GUI events, use Entity._Input instead. Gameplay events should usually be handled with either Entity._UnhandledInput or Entity._UnhandledKeyInput.
Note: This method is only called if the entity is present in the scene tree (i.e. if it's not orphan).
| Name | Type | Default |
|---|---|---|
event | InputEvent | — |
_UnhandledInputvoid
public virtual void _UnhandledInput(InputEvent @event);Called when an InputEvent hasn't been consumed by Entity._Input or any GUI Control item. It is called after Entity._ShortcutInput and after Entity._UnhandledKeyInput. The input event propagates up through the entity tree until a entity consumes it.
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with Entity.SetProcessUnhandledInput.
To consume the input event and stop it propagating further to other entities, Viewport.SetInputAsHandled can be called.
For gameplay input, this method is usually a better fit than Entity._Input, as GUI events need a higher priority. For keyboard shortcuts, consider using Entity._ShortcutInput instead, as it is called before this method. Finally, to handle keyboard events, consider using Entity._UnhandledKeyInput for performance reasons.
Note: This method is only called if the entity is present in the scene tree (i.e. if it's not an orphan).
| Name | Type | Default |
|---|---|---|
event | InputEvent | — |
_UnhandledKeyInputvoid
public virtual void _UnhandledKeyInput(InputEvent @event);Called when an InputEventKey hasn't been consumed by Entity._Input or any GUI Control item. It is called after Entity._ShortcutInput but before Entity._UnhandledInput. The input event propagates up through the entity tree until a entity consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with Entity.SetProcessUnhandledKeyInput.
To consume the input event and stop it propagating further to other entities, Viewport.SetInputAsHandled can be called.
This method can be used to handle Unicode character input with [kbd]Alt[/kbd], [kbd]Alt + Ctrl[/kbd], and [kbd]Alt + Shift[/kbd] modifiers, after shortcuts were handled.
For gameplay input, this and Entity._UnhandledInput are usually a better fit than Entity._Input, as GUI events should be handled first. This method also performs better than Entity._UnhandledInput, since unrelated events such as InputEventMouseMotion are automatically filtered. For shortcuts, consider using Entity._ShortcutInput instead.
Note: This method is only called if the entity is present in the scene tree (i.e. if it's not an orphan).
| Name | Type | Default |
|---|---|---|
event | InputEvent | — |
Signals and events11
ChildEnteredTreeEvent
public event Entity.ChildEnteredTreeEventHandler ChildEnteredTree;Emitted when the child entity enters the EntityTree, usually because this entity entered the tree (see Entity.TreeEntered), or Entity.AddChild has been called.
This signal is emitted after the child entity's own Entity.NotificationEnterTree and Entity.TreeEntered.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
ChildExitingTreeEvent
public event Entity.ChildExitingTreeEventHandler ChildExitingTree;Emitted when the child entity is about to exit the EntityTree, usually because this entity is exiting the tree (see Entity.TreeExiting), or because the child entity is being removed or freed.
When this signal is received, the child entity is still accessible inside the tree. This signal is emitted after the child entity's own Entity.TreeExiting and Entity.NotificationExitTree.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
ChildOrderChangedEvent
public event Action ChildOrderChanged;Emitted when the list of children is changed. This happens when child entities are added, moved or removed.
EditorDescriptionChangedEvent
public event Entity.EditorDescriptionChangedEventHandler EditorDescriptionChanged;Emitted when the entity's editor description field changed.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
EditorStateChangedEvent
public event Action EditorStateChanged;Emitted when an attribute of the entity that is relevant to the editor is changed. Only emitted in the editor.
ReadyEvent
public event Action Ready;Called when the entity is "ready", i.e. when both the entity and its children have entered the scene tree. If the entity has children, their Entity.Ready callbacks get triggered first, and the parent entity will receive the ready notification afterwards.
Corresponds to the Entity.NotificationReady notification in ReckfellObject.Notification. See also the @onready annotation for variables.
Usually used for initialization. For even earlier initialization, Object._init may be used. See also Entity._EnterTree.
Note: This method may be called only once for each entity. After removing a entity from the scene tree and adding it again, Entity.Ready will not be called a second time. This can be bypassed by requesting another call with Entity.RequestReady, which may be called anywhere before adding the entity again.
RenamedEvent
public event Action Renamed;Emitted when the entity's Entity.Name is changed, if the entity is inside the tree.
ReplacingByEvent
public event Entity.ReplacingByEventHandler ReplacingBy;Emitted when this entity is being replaced by the entity, see Entity.ReplaceBy.
This signal is emitted after entity has been added as a child of the original parent entity, but before all original child entities have been reparented to entity.
| Name | Type | Default |
|---|---|---|
node | Entity | — |
TreeEnteredEvent
public event Action TreeEntered;Emitted when the entity enters the tree.
This signal is emitted after the related Entity.NotificationEnterTree notification.
TreeExitedEvent
public event Action TreeExited;Emitted after the entity exits the tree and is no longer active.
This signal is emitted after the related Entity.NotificationExitTree notification.
TreeExitingEvent
public event Action TreeExiting;Emitted when the entity is just about to exit the tree. The entity is still valid. As such, this is the right place for de-initialization (or a "destructor", if you will).
This signal is emitted after the entity's Entity._ExitTree, and before the related Entity.NotificationExitTree.
Fields and constants49
NotificationAccessibilityInvalidateField
public const long NotificationAccessibilityInvalidate = 3001;Notification received when accessibility elements are invalidated. All entity accessibility elements are automatically deleted after receiving this message, therefore all existing references to such elements should be discarded.
NotificationAccessibilityUpdateField
public const long NotificationAccessibilityUpdate = 3000;Notification received when an accessibility information update is required.
NotificationApplicationFocusInField
public const long NotificationApplicationFocusIn = 2016;Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Reckfell instance. Implemented on desktop and mobile platforms.
NotificationApplicationFocusOutField
public const long NotificationApplicationFocusOut = 2017;Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Reckfell instance to the OS desktop or a thirdparty application. Implemented on desktop and mobile platforms.
NotificationApplicationPausedField
public const long NotificationApplicationPaused = 2015;Notification received from the OS when the application is paused. Specific to the Android and iOS platforms. Note: On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.
NotificationApplicationPipModeEnteredField
public const long NotificationApplicationPipModeEntered = 2019;Notification received when the application enters picture-in-picture mode.
NotificationApplicationPipModeExitedField
public const long NotificationApplicationPipModeExited = 2020;Notification received when the application exits picture-in-picture mode.
NotificationApplicationResumedField
public const long NotificationApplicationResumed = 2014;Notification received from the OS when the application is resumed. Specific to the Android and iOS platforms.
NotificationChildOrderChangedField
public const long NotificationChildOrderChanged = 24;Notification received when the list of children is changed. This happens when child entities are added, moved or removed.
NotificationCrashField
public const long NotificationCrash = 2012;Notification received from Reckfell's crash handler when the engine is about to crash. Implemented on desktop platforms, if the crash handler is enabled.
NotificationDisabledField
public const long NotificationDisabled = 28;Notification received when the entity is disabled. See Entity.ProcessModeEnum.Disabled.
NotificationDragBeginField
public const long NotificationDragBegin = 21;Notification received when a drag operation begins. All entities receive this notification, not only the dragged one.
Can be triggered either by dragging a Control that provides drag data (see Control._GetDragData) or using Control.ForceDrag.
Use Viewport.GuiGetDragData to get the dragged data.
NotificationDragEndField
public const long NotificationDragEnd = 22;Notification received when a drag operation ends.
Use Viewport.GuiIsDragSuccessful to check if the drag succeeded.
NotificationEditorPostSaveField
public const long NotificationEditorPostSave = 9002;Notification received right after the scene with the entity is saved in the editor. This notification is only sent in the Reckfell editor and will not occur in exported projects.
NotificationEditorPreSaveField
public const long NotificationEditorPreSave = 9001;Notification received right before the scene with the entity is saved in the editor. This notification is only sent in the Reckfell editor and will not occur in exported projects.
NotificationEnabledField
public const long NotificationEnabled = 29;Notification received when the entity is enabled again after being disabled. See Entity.ProcessModeEnum.Disabled.
NotificationEnterTreeField
public const long NotificationEnterTree = 10;Notification received when the entity enters a EntityTree. See Entity._EnterTree.
This notification is received before the related Entity.TreeEntered signal.
NotificationExitTreeField
public const long NotificationExitTree = 11;Notification received when the entity is about to exit a EntityTree. See Entity._ExitTree.
This notification is received after the related Entity.TreeExiting signal.
This notification is sent in reversed order.
NotificationInternalPhysicsProcessField
public const long NotificationInternalPhysicsProcess = 26;Notification received from the tree every physics frame when Entity.IsPhysicsProcessingInternal returns true.
NotificationInternalProcessField
public const long NotificationInternalProcess = 25;Notification received from the tree every rendered frame when Entity.IsProcessingInternal returns true.
NotificationMovedInParentField · Deprecated
public const long NotificationMovedInParent = 12;NotificationOsImeUpdateField
public const long NotificationOsImeUpdate = 2013;Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Implemented on desktop and web platforms.
NotificationOsMemoryWarningField
public const long NotificationOsMemoryWarning = 2009;Notification received from the OS when the application is exceeding its allocated memory. Implemented only on iOS.
NotificationParentedField
public const long NotificationParented = 18;Notification received when the entity is set as a child of another entity (see Entity.AddChild and Entity.AddSibling).
Note: This does not mean that the entity entered the EntityTree.
NotificationPathRenamedField
public const long NotificationPathRenamed = 23;Notification received when the entity's Entity.Name or one of its ancestors' Entity.Name is changed. This notification is not received when the entity is removed from the EntityTree.
NotificationPausedField
public const long NotificationPaused = 14;Notification received when the entity is paused. See Entity.ProcessMode.
NotificationPhysicsProcessField
public const long NotificationPhysicsProcess = 16;Notification received from the tree every physics frame when Entity.IsPhysicsProcessing returns true. See Entity._PhysicsProcess.
NotificationPostEnterTreeField
public const long NotificationPostEnterTree = 27;Notification received when the entity enters the tree, just before Entity.NotificationReady may be received. Unlike the latter, it is sent every time the entity enters tree, not just once.
NotificationProcessField
public const long NotificationProcess = 17;Notification received from the tree every rendered frame when Entity.IsProcessing returns true. See Entity._Process.
NotificationReadyField
public const long NotificationReady = 13;Notification received when the entity is ready. See Entity.Ready.
NotificationResetPhysicsInterpolationField
public const long NotificationResetPhysicsInterpolation = 2001;Notification received when Entity.ResetPhysicsInterpolation is called on the entity or its ancestors.
NotificationSceneInstantiatedField
public const long NotificationSceneInstantiated = 20;Notification received only by the newly instantiated scene root entity, when PackedEntity.Instantiate is completed.
NotificationTextServerChangedField
public const long NotificationTextServerChanged = 2018;Notification received when the TextServer is changed.
NotificationTranslationChangedField
public const long NotificationTranslationChanged = 2010;Notification received when translations may have changed. Can be triggered by the user changing the locale, changing Entity.AutoTranslateMode or when the entity enters the scene tree. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like ReckfellObject.Tr.
Note: This notification is received alongside Entity.NotificationEnterTree, so if you are instantiating a scene, the child entities will not be initialized yet. You can use it to setup translations for this entity, child entities created from script, or if you want to access child entities added in the editor, make sure the entity is ready using Entity.IsEntityReady.
NotificationUnparentedField
public const long NotificationUnparented = 19;Notification received when the parent entity calls Entity.RemoveChild on this entity.
Note: This does not mean that the entity exited the EntityTree.
NotificationUnpausedField
public const long NotificationUnpaused = 15;Notification received when the entity is unpaused. See Entity.ProcessMode.
NotificationVpMouseEnterField
public const long NotificationVpMouseEnter = 1010;Notification received when the mouse cursor enters the Viewport's visible area, that is not occluded behind other Controls or Windows, provided its Viewport.GuiDisableInput is false and regardless if it's currently focused or not.
NotificationVpMouseExitField
public const long NotificationVpMouseExit = 1011;Notification received when the mouse cursor leaves the Viewport's visible area, that is not occluded behind other Controls or Windows, provided its Viewport.GuiDisableInput is false and regardless if it's currently focused or not.
NotificationWMAboutField
public const long NotificationWMAbout = 2011;Notification received from the OS when a request for "About" information is sent. Implemented only on macOS.
NotificationWMCloseRequestField
public const long NotificationWMCloseRequest = 1006;Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or [kbd]Alt + F4[/kbd]). Implemented on desktop platforms.
NotificationWMDpiChangeField
public const long NotificationWMDpiChange = 1009;Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS.
NotificationWMGoBackRequestField
public const long NotificationWMGoBackRequest = 1007;Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). Implemented only on Android.
NotificationWMMouseEnterField
public const long NotificationWMMouseEnter = 1002;Notification received when the mouse enters the window. Implemented for embedded windows and on desktop and web platforms.
NotificationWMMouseExitField
public const long NotificationWMMouseExit = 1003;Notification received when the mouse leaves the window. Implemented for embedded windows and on desktop and web platforms.
NotificationWMOutputMaxLinearValueChangedField
public const long NotificationWMOutputMaxLinearValueChanged = 1013;Notification received when the output max linear value returned by Window.GetOutputMaxLinearValue has changed.
This occurs when HDR output is enabled or disabled and when any HDR output luminance values of the window have changed, such as when the player adjusts their screen brightness setting or moves the window to a different screen.
NotificationWMPositionChangedField
public const long NotificationWMPositionChanged = 1012;Notification received when the window is moved.
NotificationWMSizeChangedField
public const long NotificationWMSizeChanged = 1008;Notification received when the window is resized.
Note: Only the resized Window entity receives this notification, and it's not propagated to the child entities.
NotificationWMWindowFocusInField
public const long NotificationWMWindowFocusIn = 1004;Notification received from the OS when the entity's Window ancestor is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case Entity.NotificationApplicationFocusIn is also received).
A Window entity receives this notification when it is focused.
NotificationWMWindowFocusOutField
public const long NotificationWMWindowFocusOut = 1005;Notification received from the OS when the entity's Window ancestor is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case Entity.NotificationApplicationFocusOut is also received).
A Window entity receives this notification when it is defocused.
Entity.AutoTranslateModeEnum
| Value | Description |
|---|---|
Always = 1 | Always automatically translate. This is the inverse of |
Disabled = 2 | Never automatically translate. This is the inverse of |
Inherit = 0 | Inherits |
Entity.DuplicateFlags
| Value | Description |
|---|---|
Default = 15 | Duplicate using default flags. This constant is useful to add or remove a single flag. |
Groups = 2 | Duplicate the entity's groups. |
InternalState = 16 | Duplicate also non-serializable variables (i.e. without |
Scripts = 4 | Duplicate the entity's script (also overriding the duplicated children's scripts, if combined with |
Signals = 1 | Duplicate the entity's signal connections that are connected with the |
UseInstantiation = 8 | Duplicate using |
Entity.InternalMode
| Value | Description |
|---|---|
Back = 2 | The entity will be placed at the end of the parent's children, after any non-internal sibling. |
Disabled = 0 | The entity will not be internal. |
Front = 1 | The entity will be placed at the beginning of the parent's children, before any non-internal sibling. |
Entity.PhysicsInterpolationModeEnum
| Value | Description |
|---|---|
Inherit = 0 | Inherits |
Off = 2 | Disables physics interpolation for this entity and for children set to |
On = 1 | Enables physics interpolation for this entity and for children set to |
Entity.ProcessModeEnum
| Value | Description |
|---|---|
Always = 3 | Always processes. Keeps processing, ignoring |
Disabled = 4 | Never processes. Completely disables processing, ignoring |
Inherit = 0 | Inherits |
Pausable = 1 | Processes when |
WhenPaused = 2 | Processes only when |
Entity.ProcessThreadGroupEnum
| Value | Description |
|---|---|
Inherit = 0 | Process this entity based on the thread group mode of the first parent (or grandparent) entity that has a thread group mode that is not inherit. See |
MainThread = 1 | Process this entity (and child entities set to inherit) on the main thread. See |
SubThread = 2 | Process this entity (and child entities set to inherit) on a sub-thread. See |
Entity.ProcessThreadMessagesEnum
| Value | Description |
|---|---|
Messages = 1 | Allows this entity to process threaded messages created with |
MessagesAll = 3 | Allows this entity to process threaded messages created with |
MessagesPhysics = 2 | Allows this entity to process threaded messages created with |