| ASLHelperInstantiateASLObject Method (PrimitiveType, Vector3, Quaternion, String, String, ASLObjectASLGameObjectCreatedCallback) |
Create an ASL Object
Namespace:
ASL
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static void InstantiateASLObject(
PrimitiveType _type,
Vector3 _position,
Quaternion _rotation,
string _parentID,
string _componentAssemblyQualifiedName,
ASLObjectASLGameObjectCreatedCallback _aslGameObjectCreatedCallbackInfo
)
Public Shared Sub InstantiateASLObject (
_type As PrimitiveType,
_position As Vector3,
_rotation As Quaternion,
_parentID As String,
_componentAssemblyQualifiedName As String,
_aslGameObjectCreatedCallbackInfo As ASLObjectASLGameObjectCreatedCallback
)
public:
static void InstantiateASLObject(
PrimitiveType _type,
Vector3 _position,
Quaternion _rotation,
String^ _parentID,
String^ _componentAssemblyQualifiedName,
ASLObjectASLGameObjectCreatedCallback^ _aslGameObjectCreatedCallbackInfo
)
static member InstantiateASLObject :
_type : PrimitiveType *
_position : Vector3 *
_rotation : Quaternion *
_parentID : string *
_componentAssemblyQualifiedName : string *
_aslGameObjectCreatedCallbackInfo : ASLObjectASLGameObjectCreatedCallback -> unit
Parameters
- _type
- Type: PrimitiveType
The primitive type to be instantiated - _position
- Type: Vector3
The position where the object will be instantiated - _rotation
- Type: Quaternion
The rotation orientation of the object to be instantiated - _parentID
- Type: SystemString
The id or name of the parent object for this instantiated object - _componentAssemblyQualifiedName
- Type: SystemString
The full name of the component to be added to this object upon creation. - _aslGameObjectCreatedCallbackInfo
- Type: ASLASLObjectASLGameObjectCreatedCallback
This is the function that you want to be called after object creation
Examples void SomeFunction()
{
ASL.ASLHelper.InstantiateASLObject(PrimitiveType.Cube, new Vector3(0, 0, 0), Quaternion.identity, gameobject.GetComponent<ASL.ASLObject>().m_Id,
"MyNamespace.MyClass",
MyUponInstantiationFunction);
}
public static void MyUponInstantiationFunction(GameObject _myGameObject)
{
Debug.Log("Caller-Object ID: " + _myGameObject.GetComponent<ASL.ASLObject>().m_Id);
}
See Also