Show / Hide Table of Contents

Interface IMyPrefabManager

ModAPI interface giving ability for modders to spawn prefabs

Namespace: VRage.Game.ModAPI
Assembly: VRage.Game.dll
Syntax
public interface IMyPrefabManager

Methods

IsPathClear(Vector3D, Vector3D)

Checks if there is noting between 2 points. Raycasts inside

Declaration
bool IsPathClear(Vector3D from, Vector3D to)
Parameters
Type Name Description
Vector3D from

World position 1

Vector3D to

World position 2

Returns
Type Description
System.Boolean

True, if there is nothing between 2 points

IsPathClear(Vector3D, Vector3D, Double)

Checks if there is noting between 2 points, in cylinder shape. Does 4 Raycasts inside

Declaration
bool IsPathClear(Vector3D from, Vector3D to, double halfSize)
Parameters
Type Name Description
Vector3D from

World position 1

Vector3D to

World position 2

System.Double halfSize

Cylinder radius

Returns
Type Description
System.Boolean

True, if there is nothing between 2 points

SpawnPrefab(List<IMyCubeGrid>, String, Vector3D, Vector3, Vector3, Vector3, Vector3, String, SpawningOptions, Boolean, Action)

Spawns prefab

Declaration
void SpawnPrefab(List<IMyCubeGrid> resultList, string prefabName, Vector3D position, Vector3 forward, Vector3 up, Vector3 initialLinearVelocity = null, Vector3 initialAngularVelocity = null, string beaconName = null, SpawningOptions spawningOptions, bool updateSync = false, Action callback = null)
Parameters
Type Name Description
System.Collections.Generic.List<IMyCubeGrid> resultList

List of grids were created

System.String prefabName

Name of prefab

Vector3D position

Place to spawn. See: FindFreePlace(Vector3D, Single, Int32, Int32, Single)

Vector3 forward

Forward direction

Vector3 up

Up direction

Vector3 initialLinearVelocity

When spawned, would it would have this linear speed

Vector3 initialAngularVelocity

When spawned, would it would have this angular speed

System.String beaconName

Sets name to all beacons

SpawningOptions spawningOptions

Special spawning options

System.Boolean updateSync

Random seed depends on this

System.Action callback

Called when prefab created

SpawnPrefab(List<IMyCubeGrid>, String, Vector3D, Vector3, Vector3, Vector3, Vector3, String, SpawningOptions, Int64, Boolean, Action)

Spawns prefab

Declaration
void SpawnPrefab(List<IMyCubeGrid> resultList, string prefabName, Vector3D position, Vector3 forward, Vector3 up, Vector3 initialLinearVelocity = null, Vector3 initialAngularVelocity = null, string beaconName = null, SpawningOptions spawningOptions, long ownerId = 0L, bool updateSync = false, Action callback = null)
Parameters
Type Name Description
System.Collections.Generic.List<IMyCubeGrid> resultList

List of grids were created

System.String prefabName

Name of prefab

Vector3D position

Place to spawn. See: FindFreePlace(Vector3D, Single, Int32, Int32, Single)

Vector3 forward

Forward direction

Vector3 up

Up direction

Vector3 initialLinearVelocity

When spawned, would it would have this linear speed

Vector3 initialAngularVelocity

When spawned, would it would have this angular speed

System.String beaconName

Sets name to all beacons

SpawningOptions spawningOptions

Special spawning options

System.Int64 ownerId
System.Boolean updateSync

Random seed depends on this

System.Action callback

Called when prefab created

☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾