Пример #1
0
    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);
        }
    }
Пример #2
0
  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;
    }
  }
Пример #3
0
 internal static HandleRef getCPtr(AkSoundPosition obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Пример #4
0
 internal static HandleRef getCPtr(AkSoundPosition obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Пример #5
0
  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;
    }
  }
Пример #6
0
    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;
        }
    }
Пример #7
0
    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;
        }
    }
Пример #8
0
 internal static IntPtr getCPtr(AkSoundPosition obj)
 {
     return((obj != null) ? obj.swigCPtr : IntPtr.Zero);
 }
Пример #9
0
 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;
 }