public virtual void Dispose() { AkSoundPosition position = this; lock (position) { if (this.swigCPtr != IntPtr.Zero) { if (this.swigCMemOwn) { this.swigCMemOwn = false; AkSoundEnginePINVOKE.CSharp_delete_AkSoundPosition(this.swigCPtr); } this.swigCPtr = IntPtr.Zero; } GC.SuppressFinalize(this); } }
public static AKRESULT GetPosition(UnityEngine.GameObject in_GameObjectID, AkSoundPosition out_rPosition) { uint tempin_GameObjectID; if ( in_GameObjectID != null ) { tempin_GameObjectID = (uint)in_GameObjectID.GetInstanceID(); // Note: if AkGameObjectTracker is already attached, the following code will be bypassed. if (in_GameObjectID.GetComponent<AkGameObject>() == null) { in_GameObjectID.AddComponent<AkGameObject>(); // Note: We have missed AkGameObject.Awake() of this run to register. // So we take over its work by inlining it here. AkSoundEngine.RegisterGameObj(in_GameObjectID, in_GameObjectID.name); //Set the original position AkSoundEngine.SetObjectPosition( in_GameObjectID, in_GameObjectID.transform.position.x, in_GameObjectID.transform.position.y, in_GameObjectID.transform.position.z, in_GameObjectID.transform.forward.x, in_GameObjectID.transform.forward.y, in_GameObjectID.transform.forward.z ); } } else { tempin_GameObjectID = unchecked((uint)-1); } { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPosition(tempin_GameObjectID, AkSoundPosition.getCPtr(out_rPosition)); return ret; } }
internal static HandleRef getCPtr(AkSoundPosition obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
internal static HandleRef getCPtr(AkSoundPosition obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
public static AKRESULT GetPosition(UnityEngine.GameObject in_GameObjectID, AkSoundPosition out_rPosition) { uint tempin_GameObjectID; if ( in_GameObjectID != null ) { tempin_GameObjectID = (uint)in_GameObjectID.GetInstanceID(); // Note: if AkGameObjectTracker is already attached, the following code will be bypassed. if (in_GameObjectID.GetComponent<AkGameObject>() == null) { in_GameObjectID.AddComponent<AkGameObject>(); } } else { tempin_GameObjectID = unchecked((uint)-1); } { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPosition(tempin_GameObjectID, AkSoundPosition.getCPtr(out_rPosition)); return ret; } }
public static AKRESULT GetPosition(UnityEngine.GameObject in_GameObjectID, AkSoundPosition out_rPosition) { AkAutoObject tempObj = null; uint tempin_GameObjectID = (uint)AutoRegisterAkGameObj(in_GameObjectID, ref tempObj); { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPosition(tempin_GameObjectID, AkSoundPosition.getCPtr(out_rPosition)); return ret; } }
public static AKRESULT GetPosition(UnityEngine.GameObject in_GameObjectID, AkSoundPosition out_rPosition) { AkAutoObject tempObj = null; uint tempin_GameObjectID; if ( in_GameObjectID != null ) { tempin_GameObjectID = (uint)in_GameObjectID.GetInstanceID(); if (in_GameObjectID.activeInHierarchy) { if (in_GameObjectID.GetComponent<AkGameObj>() == null) { in_GameObjectID.AddComponent<AkGameObj>(); } } else { //Object not active. AkGameObj will not work. Use a temporary game object. //This will automatically unregister at the end of this scope. tempObj = new AkAutoObject(in_GameObjectID); tempin_GameObjectID = (uint)tempObj.m_id; //Silence warning } } else { tempin_GameObjectID = unchecked((uint)-1); } { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPosition(tempin_GameObjectID, AkSoundPosition.getCPtr(out_rPosition)); return ret; } }
internal static IntPtr getCPtr(AkSoundPosition obj) { return((obj != null) ? obj.swigCPtr : IntPtr.Zero); }
internal static IntPtr getCPtr(AkSoundPosition obj) { return((obj == null) ? IntPtr.Zero : obj.swigCPtr); }
internal static IntPtr getCPtr(AkSoundPosition obj) { return (obj == null) ? IntPtr.Zero : obj.swigCPtr; }