Entity

An entity that exists within MSW.

# Properties

[{"index":"ReadOnlyList Children (ReadOnly)","0":"The list of the child entity."}]

[{"index":"Entity CurrentMap","0":"The map entity where an entity belongs."}]

[{"index":"string CurrentMapName (ReadOnly)","0":"The map name where an entity belongs."}]

[{"index":"Entity CurrentWorld","0":"The world entity where an entity belongs."}]

[{"index":"boolean Enable","0":"Whether an entity is activated."}]

[{"index":"boolean EnabledInHierarchy (ReadOnly)","0":"Whether an entity is active in the hierarchy."}]

[{"index":"string Id (ReadOnly)","0":"An identifier for an entity."}]

[{"index":"boolean Localize (ReadOnly)","0":"The entity's localization status."}]

[{"index":"Model Model","0":"The model for this entity."}]

[{"index":"string Name (ReadOnly)","0":"The name of an entity."}]

[{"index":"string OwnerId (ReadOnly)","0":"The Id of the entity's owner."}]

[{"index":"Entity Parent (ReadOnly)","0":"The parent entity of an entity."}]

[{"index":"string Path (ReadOnly)","0":"The path of an entity."}]

[{"index":"boolean Visible","0":"Whether an entity is visible."}]

[{"index":"boolean VisibleInHierarchy (ReadOnly)","0":"Whether an entity is visible in the hierarchy."}]

# Methods

[{"index":"Component AddComponent(string typename) (ControlOnly)","0":"Adds Component corresponding to typename."}]

[{"index":"Component AddComponent(Type componentType) (ControlOnly)","0":"Adds the Component corresponding to componentType."}]

[{"index":"void AttachChild(Entity child)","0":"Attaches a child entity to this entity."}]

[{"index":"boolean AttachTo(Entity parent) (ControlOnly)","0":"Puts the entity under the parent's child."}]

[{"index":"Entity Clone(string name = \"\")","0":"Duplicates an entity and summons it."}]

[{"index":"Entity Clone(string name = \"\", boolean posOffset = true, boolean dynamic = true) (Deprecated)","0":"This function is deprecated. Use the other Clone(string) function."}]

[{"index":"EventHandlerBase ConnectEvent(string key, IScriptFunction eventHandler)","0":"Links events. A key-type event is notified as a handler when it occurs in an Entity. The handler receives event parameters."}]

[{"index":"EventHandlerBase ConnectEvent(Type eventType, IScriptFunction eventHandler)","0":"Links events. An eventType event is notified as a handler when it occurs in an Entity. The handler receives event parameters."}]

[{"index":"boolean Destroy() (ControlOnly)","0":"Destroys an entity."}]

[{"index":"boolean Destroy(float delaySeconds) (ControlOnly)","0":"Destroys the entity after delaySeconds (seconds)."}]

[{"index":"boolean Detach() (ControlOnly)","0":"Separates the entity from the parent and puts it under the child of the map where it currently belongs."}]

[{"index":"boolean DisconnectEvent(string key, EventHandlerBase eventHandler)","0":"Disconnects the event with the key-type event and the handler."}]

[{"index":"boolean DisconnectEvent(Type eventType, EventHandlerBase eventHandler)","0":"Disconnects the eventType event from its handler."}]

[{"index":"Entity GetChild(string id, boolean recursive = false)","0":"Finds the corresponding child by id and returns it."}]

[{"index":"Entity GetChildByName(string name, boolean recursive = false)","0":"Finds and returns a child entity with the corresponding name."}]

[{"index":"table GetChildComponentsByTypeName(string typename, boolean recursive = false)","0":"Finds and returns the components of the type corresponding to the typename among the components of the children."}]

[{"index":"Component GetComponent(string typename)","0":"Finds and returns the typename type components."}]

[{"index":"Component GetComponent(Type componentType)","0":"Finds and returns the componentType."}]

[{"index":"Component GetFirstChildComponentByTypeName(string typename, boolean recursive = false)","0":"Finds and returns the first typename type component among the components of the children."}]

[{"index":"boolean RemoveComponent(string typename) (ControlOnly)","0":"Removes Component corresponding to typename."}]

[{"index":"boolean RemoveComponent(Type componentType) (ControlOnly)","0":"Removes the Component corresponding to componentType."}]

[{"index":"void SendEvent(EventType sendEvent)","0":"Generates an event."}]

[{"index":"void SetEnable(boolean enable, boolean reset = false, boolean shouldSync = true)","0":"Specifies whether or not to enable. If reset is true, the activation event is processed even if the existing activation and the value to set are the same. If shouldSync is true, synchronizes whether it is enabled or not."}]

[{"index":"void SetVisible(boolean visible, boolean reset = false, boolean shouldSync = true)","0":"Sets the visibility. If reset is true, the visible event is processed even if the value to set is the same as the existing visibility. If shouldSync is true, synchronizes whether to be visible or not."}]

# Events

[{"index":"ComponentEnabledInHierarchyChangedEvent","0":"An event that triggers when a component's EnableInHierarchy is changed."}]

[{"index":"EntityAddChildrenEvent","0":"This event occurs when adding a child entity to an entity."}]

[{"index":"EntityBeginPlayEvent","0":"This event occurs on an entity's BeginPlay."}]

[{"index":"EntityChangedParentEvent","0":"This event occurs when changing the parent Entity of an Entity."}]

[{"index":"EntityEnabledInHierarchyChangedEvent","0":"This event occurs when the entity's EnabledInHierarchy changes."}]

[{"index":"EntityEndPlayEvent","0":"Event which takes place on entity's EndPlay."}]

[{"index":"EntityFinishedConstructEvent","0":"This event occurs upon configuring an entity."}]

[{"index":"EntityMapChangedEvent","0":"This event occurs when changing the map the entity belongs to."}]

[{"index":"EntityPostAddOriginComponentsEvent","0":"This event occurs after adding the components of the original model of the entity."}]

[{"index":"EntityPostApplyChangedPropertiesEvent","0":"This event occurs after applying the changed properties value of an entity."}]

[{"index":"EntityPostAttachEntityEvent","0":"This event is raised when an entity is attached to another entity. Recommend using fallback with EntityChangedParentEvent."}]

[{"index":"EntityPostChangedPathEvent","0":"This event occurs after changing an entity's path."}]

[{"index":"EntityPostDeserializeComponentsEvent","0":"This event occurs after finishing the deserialization of an entity."}]

[{"index":"EntityPostFillOriginPropertiesEvent","0":"This event occurs after filling the property value of an entity's original model."}]

[{"index":"EntityPostInitAdditionalComponentsEvent","0":"This event occurs after initializing the additional components of an entity."}]

[{"index":"EntityPostInitSyncedEvent","0":"This event occurs after finishing the InitSynced of an entity."}]

[{"index":"EntityPostInitSyncEvent","0":"This event occurs after finishing the InitSync of an entity."}]

[{"index":"EntityPostModelSetEvent","0":"This event occurs after setting the target model of an entity."}]

[{"index":"EntityPostOriginSetEvent","0":"This event occurs after setting an entity's original model."}]

[{"index":"EntityPostTransformInitEvent","0":"This event occurs after initializing an entity's Transform."}]

[{"index":"EntityPreApplyChangedPropertiesEvent","0":"This event occurs before applying the changed properties value of an entity."}]

[{"index":"EntityPreAttachEntityEvent","0":"This event is raised before an entity attaches to another entity."}]

[{"index":"EntityPreDeserializeComponentsEvent","0":"This event occurs before beginning the deserialization of an entity."}]

[{"index":"EntityPreFillOriginPropertiesEvent","0":"This event occurs before filling the property value of an entity's original model."}]

[{"index":"EntityPreInitAdditionalComponentsEvent","0":"This event occurs before initializing the additional components of an entity."}]

[{"index":"EntityPreInitSyncEvent","0":"This event occurs before beginning the InitSync of an entity."}]

[{"index":"EntityPreTransformInitEvent","0":"This event occurs before initializing an entity's Transform."}]

[{"index":"EntityRemoveChildrenEvent","0":"This event occurs after removing a child entity of an entity."}]

[{"index":"EntitySaveLoadEvent","0":"This feature is not available for creators."}]

[{"index":"EntityVisibleInHierarchyChangedEvent","0":"This event occurs when the entity's VisibleInHierarchy changes."}]

[{"index":"EntityWorldChangedEvent","0":"This event occurs when changing the world where an entity belongs."}]