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
CenterOfMass
public Vec3 CenterOfMass { get; }
Property Value
ChildCount
public int ChildCount { get; }
Property Value
ClothSimulatorComponentCount
public int ClothSimulatorComponentCount { get; }
Property Value
EntityFlags
public EntityFlags EntityFlags { get; set; }
Property Value
EntityVisibilityFlags
public EntityVisibilityFlags EntityVisibilityFlags { get; set; }
Property Value
GlobalBoxMax
public Vec3 GlobalBoxMax { get; }
Property Value
GlobalBoxMin
public Vec3 GlobalBoxMin { get; }
Property Value
GlobalPosition
public Vec3 GlobalPosition { get; }
Property Value
Mass
public float Mass { get; }
Property Value
MultiMeshComponentCount
public int MultiMeshComponentCount { get; }
Property Value
Name
public string Name { get; set; }
Property Value
Parent
public GameEntity Parent { get; }
Property Value
PhysicsDescBodyFlag
public BodyFlags PhysicsDescBodyFlag { get; }
Property Value
PhysicsGlobalBoxMax
public Vec3 PhysicsGlobalBoxMax { get; }
Property Value
PhysicsGlobalBoxMin
public Vec3 PhysicsGlobalBoxMin { get; }
Property Value
Root
public GameEntity Root { get; }
Property Value
Scene
public Scene Scene { get; }
Property Value
Skeleton
public Skeleton Skeleton { get; set; }
Property Value
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
AddChild(GameEntity, bool)
public void AddChild(GameEntity gameEntity, bool autoLocalizeFrame = false)
Parameters
gameEntity
GameEntityautoLocalizeFrame
bool
AddComponent(GameEntityComponent)
public void AddComponent(GameEntityComponent component)
Parameters
component
GameEntityComponent
AddEditDataUserToAllMeshes(bool, bool)
public void AddEditDataUserToAllMeshes(bool entityComponents, bool skeletonComponents)
Parameters
AddLight(Light)
public bool AddLight(Light light)
Parameters
light
Light
Returns
AddMesh(Mesh, bool)
public void AddMesh(Mesh mesh, bool recomputeBoundingBox = true)
Parameters
AddMeshToBone(sbyte, Mesh)
public void AddMeshToBone(sbyte boneIndex, Mesh mesh)
Parameters
AddMultiMesh(MetaMesh, bool)
public void AddMultiMesh(MetaMesh metaMesh, bool updateVisMask = true)
Parameters
AddMultiMeshToSkeleton(MetaMesh)
public void AddMultiMeshToSkeleton(MetaMesh metaMesh)
Parameters
metaMesh
MetaMesh
AddMultiMeshToSkeletonBone(MetaMesh, sbyte)
public void AddMultiMeshToSkeletonBone(MetaMesh metaMesh, sbyte boneIndex)
Parameters
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
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
CheckPointWithOrientedBoundingBox(Vec3)
public bool CheckPointWithOrientedBoundingBox(Vec3 point)
Parameters
point
Vec3
Returns
CheckResources(bool, bool)
public bool CheckResources(bool addToQueue, bool checkFaceResources)
Parameters
Returns
ClearComponents()
public void ClearComponents()
ClearEntityComponents(bool, bool, bool)
public void ClearEntityComponents(bool resetAll, bool removeScripts, bool deleteChildEntities)
Parameters
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
floatverticalAngleMaxInDegrees
floatverticalAngleMinInDegrees
floathorizontalAngleRangeInDegrees
floatairFrictionConstant
float
CopyComponentsToSkeleton()
public void CopyComponentsToSkeleton()
CopyFrom(Scene, GameEntity)
public static GameEntity CopyFrom(Scene scene, GameEntity entity)
Parameters
scene
Sceneentity
GameEntity
Returns
CopyFromPrefab(GameEntity)
public static GameEntity CopyFromPrefab(GameEntity prefab)
Parameters
prefab
GameEntity
Returns
CopyScriptComponentFromAnotherEntity(GameEntity, string)
public void CopyScriptComponentFromAnotherEntity(GameEntity otherEntity, string scriptName)
Parameters
otherEntity
GameEntityscriptName
string
CreateAndAddScriptComponent(string)
public void CreateAndAddScriptComponent(string name)
Parameters
name
string
CreateEmpty(Scene, bool)
public static GameEntity CreateEmpty(Scene scene, bool isModifiableFromEditor = true)
Parameters
Returns
CreateEmptyDynamic(Scene, bool)
public static GameEntity CreateEmptyDynamic(Scene scene, bool isModifiableFromEditor = true)
Parameters
Returns
CreateEmptyWithoutScene()
public static GameEntity CreateEmptyWithoutScene()
Returns
DeselectEntityOnEditor()
public void DeselectEntityOnEditor()
GetAllMeshesWithTag(string)
public IEnumerable<Mesh> GetAllMeshesWithTag(string tag)
Parameters
tag
string
Returns
GetBoneCount()
public sbyte GetBoneCount()
Returns
GetBoneEntitialFrameWithIndex(sbyte)
public MatrixFrame GetBoneEntitialFrameWithIndex(sbyte boneIndex)
Parameters
boneIndex
sbyte
Returns
GetBoneEntitialFrameWithName(string)
public MatrixFrame GetBoneEntitialFrameWithName(string boneName)
Parameters
boneName
string
Returns
GetBoundingBoxMax()
public Vec3 GetBoundingBoxMax()
Returns
GetBoundingBoxMin()
public Vec3 GetBoundingBoxMin()
Returns
GetBoundingBoxRadius()
public float GetBoundingBoxRadius()
Returns
GetCameraParamsFromCameraScript(Camera, ref Vec3)
public void GetCameraParamsFromCameraScript(Camera cam, ref Vec3 dofParams)
Parameters
GetChild(int)
public GameEntity GetChild(int index)
Parameters
index
int
Returns
GetChildren()
public IEnumerable<GameEntity> GetChildren()
Returns
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
GetComponentAtIndex(int, ComponentType)
public GameEntityComponent GetComponentAtIndex(int index, GameEntity.ComponentType componentType)
Parameters
index
intcomponentType
GameEntity.ComponentType
Returns
GetComponentCount(ComponentType)
public int GetComponentCount(GameEntity.ComponentType componentType)
Parameters
componentType
GameEntity.ComponentType
Returns
GetEditModeLevelVisibility()
public bool GetEditModeLevelVisibility()
Returns
GetEntityAndChildren()
public IEnumerable<GameEntity> GetEntityAndChildren()
Returns
GetFactorColor()
public uint GetFactorColor()
Returns
GetFirstMesh()
public Mesh GetFirstMesh()
Returns
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
GetFrame(out MatrixFrame)
public void GetFrame(out MatrixFrame frame)
Parameters
frame
MatrixFrame
GetGlobalFrame()
public MatrixFrame GetGlobalFrame()
Returns
GetGlobalScale()
public Vec3 GetGlobalScale()
Returns
GetGuid()
public string GetGuid()
Returns
GetHasFrameChanged()
public bool GetHasFrameChanged()
Returns
GetLight()
public Light GetLight()
Returns
GetLocalScale()
public Vec3 GetLocalScale()
Returns
GetLodLevelForDistanceSq(float)
public float GetLodLevelForDistanceSq(float distSq)
Parameters
distSq
float
Returns
GetMeshBendedFrame(MatrixFrame, ref MatrixFrame)
public void GetMeshBendedFrame(MatrixFrame worldSpacePosition, ref MatrixFrame output)
Parameters
worldSpacePosition
MatrixFrameoutput
MatrixFrame
GetMetaMesh(int)
public MetaMesh GetMetaMesh(int metaMeshIndex)
Parameters
metaMeshIndex
int
Returns
GetOldPrefabName()
public string GetOldPrefabName()
Returns
GetPhysicsBoundingBoxMax()
public Vec3 GetPhysicsBoundingBoxMax()
Returns
GetPhysicsBoundingBoxMin()
public Vec3 GetPhysicsBoundingBoxMin()
Returns
GetPhysicsMinMax(bool, out Vec3, out Vec3, bool)
public void GetPhysicsMinMax(bool includeChildren, out Vec3 bbmin, out Vec3 bbmax, bool returnLocal)
Parameters
GetPrefabName()
public string GetPrefabName()
Returns
GetPreviousGlobalFrame()
public MatrixFrame GetPreviousGlobalFrame()
Returns
GetQuickBoneEntitialFrame(sbyte, ref MatrixFrame)
public void GetQuickBoneEntitialFrame(sbyte index, ref MatrixFrame frame)
Parameters
index
sbyteframe
MatrixFrame
GetScenePointer()
public UIntPtr GetScenePointer()
Returns
GetScriptComponents()
public IEnumerable<ScriptComponentBehavior> GetScriptComponents()
Returns
GetScriptComponents<T>()
public IEnumerable<T> GetScriptComponents<T>() where T : ScriptComponentBehavior
Returns
- IEnumerable<T>
Type Parameters
T
GetUpgradeLevelMask()
public GameEntity.UpgradeLevelMask GetUpgradeLevelMask()
Returns
GetUpgradeLevelMaskCumulative()
public GameEntity.UpgradeLevelMask GetUpgradeLevelMaskCumulative()
Returns
GetUpgradeLevelOfEntity()
public int GetUpgradeLevelOfEntity()
Returns
GetVisibilityExcludeParents()
public bool GetVisibilityExcludeParents()
Returns
GetVisibilityLevelMaskIncludingParents()
public uint GetVisibilityLevelMaskIncludingParents()
Returns
HasComplexAnimTree()
public bool HasComplexAnimTree()
Returns
HasComponent(GameEntityComponent)
public bool HasComponent(GameEntityComponent component)
Parameters
component
GameEntityComponent
Returns
HasPhysicsBody()
public bool HasPhysicsBody()
Returns
HasScene()
public bool HasScene()
Returns
HasScriptComponent(string)
public bool HasScriptComponent(string scName)
Parameters
scName
string
Returns
HasScriptOfType(Type)
public bool HasScriptOfType(Type t)
Parameters
t
Type
Returns
HasScriptOfType<T>()
public bool HasScriptOfType<T>() where T : ScriptComponentBehavior
Returns
Type Parameters
T
HasTag(string)
public bool HasTag(string tag)
Parameters
tag
string
Returns
Instantiate(Scene, string, bool)
public static GameEntity Instantiate(Scene scene, string prefabName, bool callScriptCallbacks)
Parameters
Returns
Instantiate(Scene, string, MatrixFrame)
public static GameEntity Instantiate(Scene scene, string prefabName, MatrixFrame frame)
Parameters
scene
SceneprefabName
stringframe
MatrixFrame
Returns
IsGhostObject()
public bool IsGhostObject()
Returns
IsGuidValid()
public bool IsGuidValid()
Returns
IsSelectedOnEditor()
public bool IsSelectedOnEditor()
Returns
IsSkeletonAnimationPaused()
public bool IsSkeletonAnimationPaused()
Returns
IsVisibleIncludeParents()
public bool IsVisibleIncludeParents()
Returns
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
RecomputeBoundingBox()
public void RecomputeBoundingBox()
ReleaseEditDataUserToAllMeshes(bool, bool)
public void ReleaseEditDataUserToAllMeshes(bool entityComponents, bool skeletonComponents)
Parameters
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
RemoveChild(GameEntity, bool, bool, bool, int)
public void RemoveChild(GameEntity childEntity, bool keepPhysics, bool keepScenePointer, bool callScriptCallbacks, int removeReason)
Parameters
childEntity
GameEntitykeepPhysics
boolkeepScenePointer
boolcallScriptCallbacks
boolremoveReason
int
RemoveComponent(GameEntityComponent)
public bool RemoveComponent(GameEntityComponent component)
Parameters
component
GameEntityComponent
Returns
RemoveComponentWithMesh(Mesh)
public bool RemoveComponentWithMesh(Mesh mesh)
Parameters
mesh
Mesh
Returns
RemoveFromPredisplayEntity()
public void RemoveFromPredisplayEntity()
RemoveMultiMesh(MetaMesh)
public bool RemoveMultiMesh(MetaMesh metaMesh)
Parameters
metaMesh
MetaMesh
Returns
RemoveMultiMeshFromSkeleton(MetaMesh)
public void RemoveMultiMeshFromSkeleton(MetaMesh metaMesh)
Parameters
metaMesh
MetaMesh
RemoveMultiMeshFromSkeletonBone(MetaMesh, sbyte)
public void RemoveMultiMeshFromSkeletonBone(MetaMesh metaMesh, sbyte boneIndex)
Parameters
RemoveScriptComponent(UIntPtr, int)
public void RemoveScriptComponent(UIntPtr scriptComponent, int removeReason)
Parameters
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
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
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
SetContourColor(uint?, bool)
public void SetContourColor(uint? color, bool alwaysVisible = true)
Parameters
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
SetVectorArgument(float, float, float, float)
public void SetVectorArgument(float vectorArgument0, float vectorArgument1, float vectorArgument2, float vectorArgument3)
Parameters
SetVisibilityExcludeParents(bool)
public void SetVisibilityExcludeParents(bool visible)
Parameters
visible
bool
ToString()
public override string ToString()
Returns
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).