| ASL_AutonomousObjectHandlerInstantiateAutonomousObject Method (GameObject, Vector3, Quaternion, ASLObjectASLGameObjectCreatedCallback, ASLObjectClaimCancelledRecoveryCallback, ASLObjectFloatCallback, ASL_AutonomousObjectHandlerReturnInstantatedObjectCallback) |
Instatiates an ASL_AutonomousObject based on prefab. The caller of this function will be set to the owner of the instatiated ASL_AutonomousObject.
The object is created at position pos, and rotation rotation. Calls callbackFunction once the object has been instantiated, with the instatiated
GameObject as the argument. The ASLGameObjectCreatedCallback is set to creationCallbackFunction, ClaimCancelledRecoveryCallback is set to
claimRecoveryFunction, and the FloatCallback is set to floatFunciton.
Namespace:
ASL
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public void InstantiateAutonomousObject(
GameObject prefab,
Vector3 pos,
Quaternion rotation,
ASLObjectASLGameObjectCreatedCallback creationCallbackFunction,
ASLObjectClaimCancelledRecoveryCallback claimRecoveryFunction,
ASLObjectFloatCallback floatFunciton,
ASL_AutonomousObjectHandlerReturnInstantatedObjectCallback callbackFunction
)
Public Sub InstantiateAutonomousObject (
prefab As GameObject,
pos As Vector3,
rotation As Quaternion,
creationCallbackFunction As ASLObjectASLGameObjectCreatedCallback,
claimRecoveryFunction As ASLObjectClaimCancelledRecoveryCallback,
floatFunciton As ASLObjectFloatCallback,
callbackFunction As ASL_AutonomousObjectHandlerReturnInstantatedObjectCallback
)
public:
void InstantiateAutonomousObject(
GameObject^ prefab,
Vector3 pos,
Quaternion rotation,
ASLObjectASLGameObjectCreatedCallback^ creationCallbackFunction,
ASLObjectClaimCancelledRecoveryCallback^ claimRecoveryFunction,
ASLObjectFloatCallback^ floatFunciton,
ASL_AutonomousObjectHandlerReturnInstantatedObjectCallback^ callbackFunction
)
member InstantiateAutonomousObject :
prefab : GameObject *
pos : Vector3 *
rotation : Quaternion *
creationCallbackFunction : ASLObjectASLGameObjectCreatedCallback *
claimRecoveryFunction : ASLObjectClaimCancelledRecoveryCallback *
floatFunciton : ASLObjectFloatCallback *
callbackFunction : ASL_AutonomousObjectHandlerReturnInstantatedObjectCallback -> unit
Parameters
- prefab
- Type: GameObject
Prefab of GameObject to be instatiated. prefab MUST be located in Resources/MyPrefabs. - pos
- Type: Vector3
Desired initial position of the object. - rotation
- Type: Quaternion
Desired initial rotation of the object. - creationCallbackFunction
- Type: ASLASLObjectASLGameObjectCreatedCallback
Callback function that will be called once the object is created. - claimRecoveryFunction
- Type: ASLASLObjectClaimCancelledRecoveryCallback
Callback function that will be called if a claim cannot be completed. - floatFunciton
- Type: ASLASLObjectFloatCallback
The desired FloatCallback for the object. - callbackFunction
- Type: ASLASL_AutonomousObjectHandlerReturnInstantatedObjectCallback
Callback function to be called once the object has been instatiated, with the GameObject as a parameter.
See Also