Assembly: Sandbox.Game.dll

public class MyEntitiesHelper_ModAPI: IMyEntities

Events

Member Description
OnCloseAll Called when session unloads, before grids are closed

Inherited from IMyEntities
OnEntityAdd Called when AddEntity(IMyEntity, bool) called on entity

Inherited from IMyEntities
OnEntityNameSet Called when entity gets Name . First string - old name, Second - new name

Inherited from IMyEntities
OnEntityRemove Called when RemoveEntity(IMyEntity) called on entity

Inherited from IMyEntities

Constructors

Member Description
MyEntitiesHelper_ModAPI()

Methods

Member Description
AddEntity(IMyEntity, bool) Registers entity

Inherited from IMyEntities
CreateFromObjectBuilder(MyObjectBuilder_EntityBase) Create entity from object builder

Inherited from IMyEntities
CreateFromObjectBuilderAndAdd(MyObjectBuilder_EntityBase) Create entity from object builder, and then call AddEntity(IMyEntity, bool)

Inherited from IMyEntities
CreateFromObjectBuilderNoinit(MyObjectBuilder_EntityBase) Create new entity from objectBuilder, but doesn't call

Inherited from IMyEntities
CreateFromObjectBuilderParallel(MyObjectBuilder_EntityBase, bool, Action) Creates and asynchronously initializes and entity.

Inherited from IMyEntities
EnableEntityBoundingBoxDraw(IMyEntity, bool, Vector4?, float, Vector3?) Draw bounding box around entity

Inherited from IMyEntities
EntityExists(string) Returns if entity with provided name exists

Inherited from IMyEntities
EntityExists(long) Returns if entity with provided name exists

Inherited from IMyEntities
EntityExists(long?) Returns if entity with provided name exists

Inherited from IMyEntities
Exist(IMyEntity) Checks if entity is registered entity

Inherited from IMyEntities
FindFreePlace(Vector3D, float, int, int, float) Use to find place that doesn't have any voxels, grids, or physical bodies. If original position can't fill check sphere, new position in some distance is picked. Distance grows each testsPerDistance attempts. Maximum distance from BasePos that can be used is calculated by formula: maxTestCount / testsPerDistance * radius * stepSize

Inherited from IMyEntities
GetElementsInBox(ref BoundingBoxD) Returns list of entities that intersects with BoundingBox. This function will return CubeBlocks. This function works slower than GetTopMostEntitiesInBox(ref BoundingBoxD)

Inherited from IMyEntities
GetEntities(HashSet, Func<IMyEntity, bool>) Get all entities matching condition

Inherited from IMyEntities
GetEntitiesInAABB(ref BoundingBoxD) Returns list of entities that intersects with BoundingBox. This function will return CubeBlocks. This function works slower than GetTopMostEntitiesInBox(ref BoundingBoxD)

Inherited from IMyEntities
GetEntitiesInSphere(ref BoundingSphereD) Returns list of entities that intersects with sphere. This function will return CubeBlocks. This function works slower than GetTopMostEntitiesInSphere(ref BoundingSphereD)

Inherited from IMyEntities
GetEntity(Func<IMyEntity, bool>) Get first entity that matching condition

Inherited from IMyEntities
GetEntityById(long) Returns entity with provided entityId

Inherited from IMyEntities
GetEntityById(long?) Returns entity with provided entityId

Inherited from IMyEntities
GetEntityByName(string) Returns entity with provided name

Inherited from IMyEntities
GetInflatedPlayerBoundingBox(ref BoundingBoxD, float) Making playerBox include all connected players

Inherited from IMyEntities
GetIntersectionWithSphere(ref BoundingSphereD) Returns first found (not closest) entity that intersects with sphere

Inherited from IMyEntities
GetIntersectionWithSphere(ref BoundingSphereD, IMyEntity, IMyEntity) Returns first found (not closest) entity that intersects with sphere

Inherited from IMyEntities
GetIntersectionWithSphere(ref BoundingSphereD, IMyEntity, IMyEntity, bool, bool, bool, bool, bool) Returns first found (not closest) entity that intersects with sphere

Inherited from IMyEntities
GetIntersectionWithSphere(ref BoundingSphereD, IMyEntity, IMyEntity, bool, bool) Returns list of entities that intersects with sphere

Inherited from IMyEntities
GetTopMostEntitiesInBox(ref BoundingBoxD) Returns list of TopMost entities that intersects with bounding box. This function won't return CubeBlocks. Use GetElementsInBox(ref BoundingBoxD) to retrieve CubeBlocks also.

Inherited from IMyEntities
GetTopMostEntitiesInSphere(ref BoundingSphereD) Returns list of TopMost entities that intersects with sphere. This function won't return CubeBlocks. Use GetEntitiesInSphere(ref BoundingSphereD) to retrieve CubeBlocks also.

Inherited from IMyEntities
IsInsideVoxel(Vector3D, Vector3D, out Vector3D) Return true if line between pos and hintPosition doesn't intersect any voxel, or intersects it even number of times Does inside physical ray casting inside

Inherited from IMyEntities
IsInsideWorld(Vector3D) Returns true if distance from 0,0,0 to provided position is less than WorldHalfExtent()

Inherited from IMyEntities
IsNameExists(IMyEntity, string) Checks if registered name belongs to this entity

Inherited from IMyEntities
IsRaycastBlocked(Vector3D, Vector3D) Returns true if raycast hits anything (with raycast layer=0)

Inherited from IMyEntities
IsSpherePenetrating(ref BoundingSphereD) Checks if sphere hits any HkRigidBodyprohibited

Inherited from IMyEntities
IsTypeHidden(Type) Gets whether entities that inherit type is visible or not. Example:csharp<br />IsTypeHidden(typeof (IMyCubeGrid))<br /><br />

Inherited from IMyEntities
IsVisible(IMyEntity) Gets whether entity is visible or not because of SetTypeHidden(Type, bool)

Inherited from IMyEntities
IsWorldLimited() Return whether world has limited size in kilometers

Inherited from IMyEntities
MarkForClose(IMyEntity) Mark entity as closed. Soon it would be deleted. Doesn't call Close()

Inherited from IMyEntities
RegisterForDraw(IMyEntity) Make entity receive PrepareForDraw and sending to it's Render Draw call

Inherited from IMyEntities
RegisterForUpdate(IMyEntity) Make entity receive UpdateBeforeSimulation, UpdateBefore10Simulation, UpdateBefore100Simulation, UpdateAfterSimulation, UpdateAfter10Simulation, UpdateAfter100Simulation, Simulate, UpdateBeforeNextFrame depending on it's NeedsUpdate flags. Physics are still simulated

Inherited from IMyEntities
RemapObjectBuilder(MyObjectBuilder_EntityBase) Remaps this entity's EntityId and Name to a new values.

Inherited from IMyEntities
RemapObjectBuilderCollection(IEnumerable<MyObjectBuilder_EntityBase>) Remaps this entity's EntityId and Name to a new values.

Inherited from IMyEntities
RemoveEntity(IMyEntity) Unregisters entity

Inherited from IMyEntities
RemoveFromClosedEntities(IMyEntity) Remove entity from lists of closed entities

Inherited from IMyEntities
RemoveName(IMyEntity) Removes registered name from entity.

Inherited from IMyEntities
SetEntityName(IMyEntity, bool) Apply Name for entity

Inherited from IMyEntities
SetTypeHidden(Type, bool) Entities that inherit that type would be visible/invisible.

Inherited from IMyEntities
TryGetEntityById(long, out IMyEntity) Returns entity with provided id

Inherited from IMyEntities
TryGetEntityById(long?, out IMyEntity) Returns entity with provided id

Inherited from IMyEntities
TryGetEntityByName(string, out IMyEntity) Returns entity with provided name

Inherited from IMyEntities
UnhideAllTypes() Revert all changes to default. Make all entities visible, that were hidden because of SetTypeHidden(Type, bool)

Inherited from IMyEntities
UnregisterForDraw(IMyEntity) Unregistering entity from PrepareForDraw events and it Render from Draw calls. Entity may still be rendered

Inherited from IMyEntities
UnregisterForUpdate(IMyEntity, bool) Unregistering entity from following updates: UpdateBeforeSimulation, UpdateBefore10Simulation, UpdateBefore100Simulation, UpdateAfterSimulation, UpdateAfter10Simulation, UpdateAfter100Simulation, Simulate, UpdateBeforeNextFrame Physics are still simulated

Inherited from IMyEntities
WorldHalfExtent() Returns shortest distance (i.e. axis-aligned) to the world border from the world center. Will be 0 if world is borderless

Inherited from IMyEntities
WorldSafeHalfExtent() Returns shortest distance (i.e. axis-aligned) to the world border from the world center, minus 600m to make spawning somewhat safer. Will be 0 if world is borderless

Inherited from IMyEntities
GetInflatedPlayerBoundingBox(ref BoundingBox, float) Obsolete

Inherited from IMyEntities
IsInsideVoxel(Vector3, Vector3, out Vector3) Obsolete

Inherited from IMyEntities

Implements: