Table of Contents

Class GameEntity

Namespace
TaleWorlds.Engine
Assembly
TaleWorlds.Engine.dll
[EngineClass("rglEntity")]
public sealed class GameEntity : NativeObject
Inheritance
GameEntity
Inherited Members
Extension Methods

Properties

BodyFlag

public BodyFlags BodyFlag { get; set; }

Property Value

BodyFlags

CenterOfMass

public Vec3 CenterOfMass { get; }

Property Value

Vec3

ChildCount

public int ChildCount { get; }

Property Value

int

ClothSimulatorComponentCount

public int ClothSimulatorComponentCount { get; }

Property Value

int

EntityFlags

public EntityFlags EntityFlags { get; set; }

Property Value

EntityFlags

EntityVisibilityFlags

public EntityVisibilityFlags EntityVisibilityFlags { get; set; }

Property Value

EntityVisibilityFlags

GlobalBoxMax

public Vec3 GlobalBoxMax { get; }

Property Value

Vec3

GlobalBoxMin

public Vec3 GlobalBoxMin { get; }

Property Value

Vec3

GlobalPosition

public Vec3 GlobalPosition { get; }

Property Value

Vec3

Mass

public float Mass { get; }

Property Value

float

MultiMeshComponentCount

public int MultiMeshComponentCount { get; }

Property Value

int

Name

public string Name { get; set; }

Property Value

string

Parent

public GameEntity Parent { get; }

Property Value

GameEntity

PhysicsDescBodyFlag

public BodyFlags PhysicsDescBodyFlag { get; }

Property Value

BodyFlags

PhysicsGlobalBoxMax

public Vec3 PhysicsGlobalBoxMax { get; }

Property Value

Vec3

PhysicsGlobalBoxMin

public Vec3 PhysicsGlobalBoxMin { get; }

Property Value

Vec3

Root

public GameEntity Root { get; }

Property Value

GameEntity

Scene

public Scene Scene { get; }

Property Value

Scene

Skeleton

public Skeleton Skeleton { get; set; }

Property Value

Skeleton

Tags

public string[] Tags { get; }

Property Value

string[]

Methods

ActivateRagdoll()

public void ActivateRagdoll()

AddAllMeshesOfGameEntity(GameEntity)

public void AddAllMeshesOfGameEntity(GameEntity gameEntity)

Parameters

gameEntity GameEntity

AddBodyFlags(BodyFlags, bool)

public void AddBodyFlags(BodyFlags bodyFlags, bool applyToChildren = true)

Parameters

bodyFlags BodyFlags
applyToChildren bool

AddChild(GameEntity, bool)

public void AddChild(GameEntity gameEntity, bool autoLocalizeFrame = false)

Parameters

gameEntity GameEntity
autoLocalizeFrame bool

AddComponent(GameEntityComponent)

public void AddComponent(GameEntityComponent component)

Parameters

component GameEntityComponent

AddEditDataUserToAllMeshes(bool, bool)

public void AddEditDataUserToAllMeshes(bool entityComponents, bool skeletonComponents)

Parameters

entityComponents bool
skeletonComponents bool

AddLight(Light)

public bool AddLight(Light light)

Parameters

light Light

Returns

bool

AddMesh(Mesh, bool)

public void AddMesh(Mesh mesh, bool recomputeBoundingBox = true)

Parameters

mesh Mesh
recomputeBoundingBox bool

AddMeshToBone(sbyte, Mesh)

public void AddMeshToBone(sbyte boneIndex, Mesh mesh)

Parameters

boneIndex sbyte
mesh Mesh

AddMultiMesh(MetaMesh, bool)

public void AddMultiMesh(MetaMesh metaMesh, bool updateVisMask = true)

Parameters

metaMesh MetaMesh
updateVisMask bool

AddMultiMeshToSkeleton(MetaMesh)

public void AddMultiMeshToSkeleton(MetaMesh metaMesh)

Parameters

metaMesh MetaMesh

AddMultiMeshToSkeletonBone(MetaMesh, sbyte)

public void AddMultiMeshToSkeletonBone(MetaMesh metaMesh, sbyte boneIndex)

Parameters

metaMesh MetaMesh
boneIndex sbyte

AddParticleSystemComponent(string)

public void AddParticleSystemComponent(string particleid)

Parameters

particleid string

AddTag(string)

public void AddTag(string tag)

Parameters

tag string

AttachNavigationMeshFaces(int, bool, bool, bool)

public void AttachNavigationMeshFaces(int faceGroupId, bool isConnected, bool isBlocker = false, bool autoLocalize = false)

Parameters

faceGroupId int
isConnected bool
isBlocker bool
autoLocalize bool

BreakPrefab()

public void BreakPrefab()

BurstEntityParticle(bool)

public void BurstEntityParticle(bool doChildren)

Parameters

doChildren bool

CallScriptCallbacks()

public void CallScriptCallbacks()

ChangeMetaMeshOrRemoveItIfNotExists(MetaMesh, MetaMesh)

public void ChangeMetaMeshOrRemoveItIfNotExists(MetaMesh entityMetaMesh, MetaMesh newMetaMesh)

Parameters

entityMetaMesh MetaMesh
newMetaMesh MetaMesh

CheckPointWithOrientedBoundingBox(Vec3)

public bool CheckPointWithOrientedBoundingBox(Vec3 point)

Parameters

point Vec3

Returns

bool

CheckResources(bool, bool)

public bool CheckResources(bool addToQueue, bool checkFaceResources)

Parameters

addToQueue bool
checkFaceResources bool

Returns

bool

ClearComponents()

public void ClearComponents()

ClearEntityComponents(bool, bool, bool)

public void ClearEntityComponents(bool resetAll, bool removeScripts, bool deleteChildEntities)

Parameters

resetAll bool
removeScripts bool
deleteChildEntities bool

ClearOnlyOwnComponents()

public void ClearOnlyOwnComponents()

ComputeTrajectoryVolume(float, float, float, float, float)

public void ComputeTrajectoryVolume(float missileSpeed, float verticalAngleMaxInDegrees, float verticalAngleMinInDegrees, float horizontalAngleRangeInDegrees, float airFrictionConstant)

Parameters

missileSpeed float
verticalAngleMaxInDegrees float
verticalAngleMinInDegrees float
horizontalAngleRangeInDegrees float
airFrictionConstant float

CopyComponentsToSkeleton()

public void CopyComponentsToSkeleton()

CopyFrom(Scene, GameEntity)

public static GameEntity CopyFrom(Scene scene, GameEntity entity)

Parameters

scene Scene
entity GameEntity

Returns

GameEntity

CopyFromPrefab(GameEntity)

public static GameEntity CopyFromPrefab(GameEntity prefab)

Parameters

prefab GameEntity

Returns

GameEntity

CopyScriptComponentFromAnotherEntity(GameEntity, string)

public void CopyScriptComponentFromAnotherEntity(GameEntity otherEntity, string scriptName)

Parameters

otherEntity GameEntity
scriptName string

CreateAndAddScriptComponent(string)

public void CreateAndAddScriptComponent(string name)

Parameters

name string

CreateEmpty(Scene, bool)

public static GameEntity CreateEmpty(Scene scene, bool isModifiableFromEditor = true)

Parameters

scene Scene
isModifiableFromEditor bool

Returns

GameEntity

CreateEmptyDynamic(Scene, bool)

public static GameEntity CreateEmptyDynamic(Scene scene, bool isModifiableFromEditor = true)

Parameters

scene Scene
isModifiableFromEditor bool

Returns

GameEntity

CreateEmptyWithoutScene()

public static GameEntity CreateEmptyWithoutScene()

Returns

GameEntity

DeselectEntityOnEditor()

public void DeselectEntityOnEditor()

GetAllMeshesWithTag(string)

public IEnumerable<Mesh> GetAllMeshesWithTag(string tag)

Parameters

tag string

Returns

IEnumerable<Mesh>

GetBoneCount()

public sbyte GetBoneCount()

Returns

sbyte

GetBoneEntitialFrameWithIndex(sbyte)

public MatrixFrame GetBoneEntitialFrameWithIndex(sbyte boneIndex)

Parameters

boneIndex sbyte

Returns

MatrixFrame

GetBoneEntitialFrameWithName(string)

public MatrixFrame GetBoneEntitialFrameWithName(string boneName)

Parameters

boneName string

Returns

MatrixFrame

GetBoundingBoxMax()

public Vec3 GetBoundingBoxMax()

Returns

Vec3

GetBoundingBoxMin()

public Vec3 GetBoundingBoxMin()

Returns

Vec3

GetBoundingBoxRadius()

public float GetBoundingBoxRadius()

Returns

float

GetCameraParamsFromCameraScript(Camera, ref Vec3)

public void GetCameraParamsFromCameraScript(Camera cam, ref Vec3 dofParams)

Parameters

cam Camera
dofParams Vec3

GetChild(int)

public GameEntity GetChild(int index)

Parameters

index int

Returns

GameEntity

GetChildren()

public IEnumerable<GameEntity> GetChildren()

Returns

IEnumerable<GameEntity>

GetChildrenRecursive(ref List<GameEntity>)

public void GetChildrenRecursive(ref List<GameEntity> children)

Parameters

children List<GameEntity>

GetClothSimulator(int)

public ClothSimulatorComponent GetClothSimulator(int clothSimulatorIndex)

Parameters

clothSimulatorIndex int

Returns

ClothSimulatorComponent

GetComponentAtIndex(int, ComponentType)

public GameEntityComponent GetComponentAtIndex(int index, GameEntity.ComponentType componentType)

Parameters

index int
componentType GameEntity.ComponentType

Returns

GameEntityComponent

GetComponentCount(ComponentType)

public int GetComponentCount(GameEntity.ComponentType componentType)

Parameters

componentType GameEntity.ComponentType

Returns

int

GetEditModeLevelVisibility()

public bool GetEditModeLevelVisibility()

Returns

bool

GetEntityAndChildren()

public IEnumerable<GameEntity> GetEntityAndChildren()

Returns

IEnumerable<GameEntity>

GetFactorColor()

public uint GetFactorColor()

Returns

uint

GetFirstMesh()

public Mesh GetFirstMesh()

Returns

Mesh

GetFirstScriptOfTypeInFamily<T>()

public T GetFirstScriptOfTypeInFamily<T>() where T : ScriptComponentBehavior

Returns

T

Type Parameters

T

GetFirstScriptOfType<T>()

public T GetFirstScriptOfType<T>() where T : ScriptComponentBehavior

Returns

T

Type Parameters

T

GetFrame()

public MatrixFrame GetFrame()

Returns

MatrixFrame

GetFrame(out MatrixFrame)

public void GetFrame(out MatrixFrame frame)

Parameters

frame MatrixFrame

GetGlobalFrame()

public MatrixFrame GetGlobalFrame()

Returns

MatrixFrame

GetGlobalScale()

public Vec3 GetGlobalScale()

Returns

Vec3

GetGuid()

public string GetGuid()

Returns

string

GetHasFrameChanged()

public bool GetHasFrameChanged()

Returns

bool

GetLight()

public Light GetLight()

Returns

Light

GetLocalScale()

public Vec3 GetLocalScale()

Returns

Vec3

GetLodLevelForDistanceSq(float)

public float GetLodLevelForDistanceSq(float distSq)

Parameters

distSq float

Returns

float

GetMeshBendedFrame(MatrixFrame, ref MatrixFrame)

public void GetMeshBendedFrame(MatrixFrame worldSpacePosition, ref MatrixFrame output)

Parameters

worldSpacePosition MatrixFrame
output MatrixFrame

GetMetaMesh(int)

public MetaMesh GetMetaMesh(int metaMeshIndex)

Parameters

metaMeshIndex int

Returns

MetaMesh

GetOldPrefabName()

public string GetOldPrefabName()

Returns

string

GetPhysicsBoundingBoxMax()

public Vec3 GetPhysicsBoundingBoxMax()

Returns

Vec3

GetPhysicsBoundingBoxMin()

public Vec3 GetPhysicsBoundingBoxMin()

Returns

Vec3

GetPhysicsMinMax(bool, out Vec3, out Vec3, bool)

public void GetPhysicsMinMax(bool includeChildren, out Vec3 bbmin, out Vec3 bbmax, bool returnLocal)

Parameters

includeChildren bool
bbmin Vec3
bbmax Vec3
returnLocal bool

GetPrefabName()

public string GetPrefabName()

Returns

string

GetPreviousGlobalFrame()

public MatrixFrame GetPreviousGlobalFrame()

Returns

MatrixFrame

GetQuickBoneEntitialFrame(sbyte, ref MatrixFrame)

public void GetQuickBoneEntitialFrame(sbyte index, ref MatrixFrame frame)

Parameters

index sbyte
frame MatrixFrame

GetScenePointer()

public UIntPtr GetScenePointer()

Returns

UIntPtr

GetScriptComponents()

public IEnumerable<ScriptComponentBehavior> GetScriptComponents()

Returns

IEnumerable<ScriptComponentBehavior>

GetScriptComponents<T>()

public IEnumerable<T> GetScriptComponents<T>() where T : ScriptComponentBehavior

Returns

IEnumerable<T>

Type Parameters

T

GetUpgradeLevelMask()

public GameEntity.UpgradeLevelMask GetUpgradeLevelMask()

Returns

GameEntity.UpgradeLevelMask

GetUpgradeLevelMaskCumulative()

public GameEntity.UpgradeLevelMask GetUpgradeLevelMaskCumulative()

Returns

GameEntity.UpgradeLevelMask

GetUpgradeLevelOfEntity()

public int GetUpgradeLevelOfEntity()

Returns

int

GetVisibilityExcludeParents()

public bool GetVisibilityExcludeParents()

Returns

bool

GetVisibilityLevelMaskIncludingParents()

public uint GetVisibilityLevelMaskIncludingParents()

Returns

uint

HasComplexAnimTree()

public bool HasComplexAnimTree()

Returns

bool

HasComponent(GameEntityComponent)

public bool HasComponent(GameEntityComponent component)

Parameters

component GameEntityComponent

Returns

bool

HasPhysicsBody()

public bool HasPhysicsBody()

Returns

bool

HasScene()

public bool HasScene()

Returns

bool

HasScriptComponent(string)

public bool HasScriptComponent(string scName)

Parameters

scName string

Returns

bool

HasScriptOfType(Type)

public bool HasScriptOfType(Type t)

Parameters

t Type

Returns

bool

HasScriptOfType<T>()

public bool HasScriptOfType<T>() where T : ScriptComponentBehavior

Returns

bool

Type Parameters

T

HasTag(string)

public bool HasTag(string tag)

Parameters

tag string

Returns

bool

Instantiate(Scene, string, bool)

public static GameEntity Instantiate(Scene scene, string prefabName, bool callScriptCallbacks)

Parameters

scene Scene
prefabName string
callScriptCallbacks bool

Returns

GameEntity

Instantiate(Scene, string, MatrixFrame)

public static GameEntity Instantiate(Scene scene, string prefabName, MatrixFrame frame)

Parameters

scene Scene
prefabName string
frame MatrixFrame

Returns

GameEntity

IsGhostObject()

public bool IsGhostObject()

Returns

bool

IsGuidValid()

public bool IsGuidValid()

Returns

bool

IsSelectedOnEditor()

public bool IsSelectedOnEditor()

Returns

bool

IsSkeletonAnimationPaused()

public bool IsSkeletonAnimationPaused()

Returns

bool

IsVisibleIncludeParents()

public bool IsVisibleIncludeParents()

Returns

bool

PauseParticleSystem(bool)

public void PauseParticleSystem(bool doChildren)

Parameters

doChildren bool

PauseSkeletonAnimation()

public void PauseSkeletonAnimation()

PrefabExists(string)

public static bool PrefabExists(string name)

Parameters

name string

Returns

bool

RecomputeBoundingBox()

public void RecomputeBoundingBox()

ReleaseEditDataUserToAllMeshes(bool, bool)

public void ReleaseEditDataUserToAllMeshes(bool entityComponents, bool skeletonComponents)

Parameters

entityComponents bool
skeletonComponents bool

Remove(int)

public void Remove(int removeReason)

Parameters

removeReason int

RemoveAllChildren()

public void RemoveAllChildren()

RemoveAllParticleSystems()

public void RemoveAllParticleSystems()

RemoveBodyFlags(BodyFlags, bool)

public void RemoveBodyFlags(BodyFlags bodyFlags, bool applyToChildren = true)

Parameters

bodyFlags BodyFlags
applyToChildren bool

RemoveChild(GameEntity, bool, bool, bool, int)

public void RemoveChild(GameEntity childEntity, bool keepPhysics, bool keepScenePointer, bool callScriptCallbacks, int removeReason)

Parameters

childEntity GameEntity
keepPhysics bool
keepScenePointer bool
callScriptCallbacks bool
removeReason int

RemoveComponent(GameEntityComponent)

public bool RemoveComponent(GameEntityComponent component)

Parameters

component GameEntityComponent

Returns

bool

RemoveComponentWithMesh(Mesh)

public bool RemoveComponentWithMesh(Mesh mesh)

Parameters

mesh Mesh

Returns

bool

RemoveFromPredisplayEntity()

public void RemoveFromPredisplayEntity()

RemoveMultiMesh(MetaMesh)

public bool RemoveMultiMesh(MetaMesh metaMesh)

Parameters

metaMesh MetaMesh

Returns

bool

RemoveMultiMeshFromSkeleton(MetaMesh)

public void RemoveMultiMeshFromSkeleton(MetaMesh metaMesh)

Parameters

metaMesh MetaMesh

RemoveMultiMeshFromSkeletonBone(MetaMesh, sbyte)

public void RemoveMultiMeshFromSkeletonBone(MetaMesh metaMesh, sbyte boneIndex)

Parameters

metaMesh MetaMesh
boneIndex sbyte

RemoveScriptComponent(UIntPtr, int)

public void RemoveScriptComponent(UIntPtr scriptComponent, int removeReason)

Parameters

scriptComponent UIntPtr
removeReason int

RemoveSkeleton()

public void RemoveSkeleton()

RemoveTag(string)

public void RemoveTag(string tag)

Parameters

tag string

ResumeParticleSystem(bool)

public void ResumeParticleSystem(bool doChildren)

Parameters

doChildren bool

ResumeSkeletonAnimation()

public void ResumeSkeletonAnimation()

SelectEntityOnEditor()

public void SelectEntityOnEditor()

SetAlpha(float)

public void SetAlpha(float alpha)

Parameters

alpha float

SetAnimTreeChannelParameterForceUpdate(float, int)

public void SetAnimTreeChannelParameterForceUpdate(float phase, int channelNo)

Parameters

phase float
channelNo int

SetAnimationSoundActivation(bool)

public void SetAnimationSoundActivation(bool activate)

Parameters

activate bool

SetAsPredisplayEntity()

public void SetAsPredisplayEntity()

SetAsReplayEntity()

public void SetAsReplayEntity()

SetBodyFlags(BodyFlags)

public void SetBodyFlags(BodyFlags bodyFlags)

Parameters

bodyFlags BodyFlags

SetBodyFlagsRecursive(BodyFlags)

public void SetBodyFlagsRecursive(BodyFlags bodyFlags)

Parameters

bodyFlags BodyFlags

SetBoundingboxDirty()

public void SetBoundingboxDirty()

SetClothComponentKeepState(MetaMesh, bool)

public void SetClothComponentKeepState(MetaMesh metaMesh, bool state)

Parameters

metaMesh MetaMesh
state bool

SetClothComponentKeepStateOfAllMeshes(bool)

public void SetClothComponentKeepStateOfAllMeshes(bool state)

Parameters

state bool

SetClothMaxDistanceMultiplier(float)

public void SetClothMaxDistanceMultiplier(float multiplier)

Parameters

multiplier float

SetColor(uint, uint, string)

public void SetColor(uint color1, uint color2, string meshTag)

Parameters

color1 uint
color2 uint
meshTag string

SetContourColor(uint?, bool)

public void SetContourColor(uint? color, bool alwaysVisible = true)

Parameters

color uint?
alwaysVisible bool

SetCullMode(MBMeshCullingMode)

public void SetCullMode(MBMeshCullingMode cullMode)

Parameters

cullMode MBMeshCullingMode

SetEnforcedMaximumLodLevel(int)

public void SetEnforcedMaximumLodLevel(int lodLevel)

Parameters

lodLevel int

SetEntityEnvMapVisibility(bool)

public void SetEntityEnvMapVisibility(bool value)

Parameters

value bool

SetExternalReferencesUsage(bool)

public void SetExternalReferencesUsage(bool value)

Parameters

value bool

SetFactorColor(uint)

public void SetFactorColor(uint color)

Parameters

color uint

SetFrame(ref MatrixFrame)

public void SetFrame(ref MatrixFrame frame)

Parameters

frame MatrixFrame

SetFrameChanged()

public void SetFrameChanged()

SetGlobalFrame(in MatrixFrame)

public void SetGlobalFrame(in MatrixFrame frame)

Parameters

frame MatrixFrame

SetGlobalFrameMT(in MatrixFrame)

public void SetGlobalFrameMT(in MatrixFrame frame)

Parameters

frame MatrixFrame

SetLocalPosition(Vec3)

public void SetLocalPosition(Vec3 position)

Parameters

position Vec3

SetMaterialForAllMeshes(Material)

public void SetMaterialForAllMeshes(Material material)

Parameters

material Material

SetMobility(Mobility)

public void SetMobility(GameEntity.Mobility mobility)

Parameters

mobility GameEntity.Mobility

SetMorphFrameOfComponents(float)

public void SetMorphFrameOfComponents(float value)

Parameters

value float

SetPreviousFrameInvalid()

public void SetPreviousFrameInvalid()

SetReadyToRender(bool)

public void SetReadyToRender(bool ready)

Parameters

ready bool

SetRuntimeEmissionRateMultiplier(float)

public void SetRuntimeEmissionRateMultiplier(float emissionRateMultiplier)

Parameters

emissionRateMultiplier float

SetUpgradeLevelMask(UpgradeLevelMask)

public void SetUpgradeLevelMask(GameEntity.UpgradeLevelMask mask)

Parameters

mask GameEntity.UpgradeLevelMask

SetVectorArgument(float, float, float, float)

public void SetVectorArgument(float vectorArgument0, float vectorArgument1, float vectorArgument2, float vectorArgument3)

Parameters

vectorArgument0 float
vectorArgument1 float
vectorArgument2 float
vectorArgument3 float

SetVisibilityExcludeParents(bool)

public void SetVisibilityExcludeParents(bool visible)

Parameters

visible bool

ToString()

public override string ToString()

Returns

string

UpdateGlobalBounds()

public void UpdateGlobalBounds()

UpdateTriadFrameForEditor()

public void UpdateTriadFrameForEditor()

UpdateTriadFrameForEditorForAllChildren()

public void UpdateTriadFrameForEditorForAllChildren()

UpdateVisibilityMask()

public void UpdateVisibilityMask()

ValidateBoundingBox()

public void ValidateBoundingBox()

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).