public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve)
    {
        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_ExecuteActionOnEvent__SWIG_6(in_pszEventName, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve);

          return ret;
        }
    }
Esempio n. 2
0
    private static int AutoRegisterAkGameObj(UnityEngine.GameObject in_gameObject, ref AkAutoObject autoObject)
    {
        int Id = -1;
        if ( in_gameObject != null )
        {
            Id = in_gameObject.GetInstanceID();
            if( !IsAkGameObjectRegistered(in_gameObject) )
            {
                if (in_gameObject.activeInHierarchy)
                {
                    in_gameObject.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.
                    autoObject = new AkAutoObject(in_gameObject);
                    Id = autoObject.m_id;
                }
            }
        }

        return Id;
    }
    public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie)
    {
        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);
        }

        in_pCookie = AkCallbackManager.EventCallbackPackage.Create(in_pfnCallback, in_pCookie, ref in_uFlags);
        {
        uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_1(tempin_gameObjectID, in_uFlags, in_uFlags != 0 ? (IntPtr)1 : (IntPtr)0, in_pCookie != null ? (IntPtr)in_pCookie.GetHashCode() : (IntPtr)0);
        AkCallbackManager.SetLastAddedPlayingID(ret);
        return ret;
        }
    }
    public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID)
    {
        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);
        }

        {
        uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_3(tempin_gameObjectID);
        AkCallbackManager.SetLastAddedPlayingID(ret);
        return ret;
        }
    }
    public static AKRESULT SetSwitch(string in_pszSwitchGroup, string in_pszSwitchState, UnityEngine.GameObject in_gameObjectID)
    {
        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_SetSwitch__SWIG_1(in_pszSwitchGroup, in_pszSwitchState, tempin_gameObjectID);

          return ret;
        }
    }
    public static void StopAll(UnityEngine.GameObject in_gameObjectID)
    {
        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);
        }

        {
          AkSoundEnginePINVOKE.CSharp_StopAll__SWIG_0(tempin_gameObjectID);

        }
    }
    public static AKRESULT SetObjectPosition(UnityEngine.GameObject in_GameObjectID, float PosX, float PosY, float PosZ, float OrientationX, float OrientationY, float OrientationZ)
    {
        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_SetObjectPosition(tempin_GameObjectID, PosX, PosY, PosZ, OrientationX, OrientationY, OrientationZ);

          return ret;
        }
    }
    public static AKRESULT SetRTPCValue(string in_pszRtpcName, float in_value, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration, AkCurveInterpolation in_eFadeCurve, bool in_bBypassInternalValueInterpolation)
    {
        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_SetRTPCValue__SWIG_5(in_pszRtpcName, in_value, tempin_gameObjectID, in_uValueChangeDuration, (int)in_eFadeCurve, in_bBypassInternalValueInterpolation);

          return ret;
        }
    }
    public static AKRESULT SeekOnEvent(string in_pszEventName, UnityEngine.GameObject in_gameObjectID, float in_fPercent, bool in_bSeekToNearestMarker)
    {
        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_SeekOnEvent__SWIG_13(in_pszEventName, tempin_gameObjectID, in_fPercent, in_bSeekToNearestMarker);

          return ret;
        }
    }
Esempio n. 10
0
    public static AKRESULT SetMultiplePositions(UnityEngine.GameObject in_GameObjectID, AkPositionArray in_pPositions, ushort in_NumPositions)
    {
        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_SetMultiplePositions__SWIG_1(tempin_GameObjectID, in_pPositions.m_Buffer, in_NumPositions);

          return ret;
        }
    }
Esempio n. 11
0
    public static AKRESULT ResetRTPCValue(uint in_rtpcID, UnityEngine.GameObject in_gameObjectID, int in_uValueChangeDuration)
    {
        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_ResetRTPCValue__SWIG_2(in_rtpcID, tempin_gameObjectID, in_uValueChangeDuration);

          return ret;
        }
    }
Esempio n. 12
0
    public static AKRESULT GetPlayingIDsFromGameObject(UnityEngine.GameObject in_GameObjId, ref uint io_ruNumIDs, uint[] out_aPlayingIDs)
    {
        AkAutoObject tempObj = null;
        uint tempin_GameObjId;
        if ( in_GameObjId != null )
        {
            tempin_GameObjId = (uint)in_GameObjId.GetInstanceID();
            if (in_GameObjId.activeInHierarchy)
            {
                if (in_GameObjId.GetComponent<AkGameObj>() == null)
                {
                    in_GameObjId.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_GameObjId);
                tempin_GameObjId = (uint)tempObj.m_id;	//Silence warning
            }
        }
        else
        {
            tempin_GameObjId = unchecked((uint)-1);
        }

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetPlayingIDsFromGameObject(tempin_GameObjId, ref io_ruNumIDs, out_aPlayingIDs);

          return ret;
        }
    }
Esempio n. 13
0
    public static AKRESULT GetObjectObstructionAndOcclusion(UnityEngine.GameObject in_ObjectID, uint in_uListener, out float out_rfObstructionLevel, out float out_rfOcclusionLevel)
    {
        AkAutoObject tempObj = null;
        uint tempin_ObjectID;
        if ( in_ObjectID != null )
        {
            tempin_ObjectID = (uint)in_ObjectID.GetInstanceID();
            if (in_ObjectID.activeInHierarchy)
            {
                if (in_ObjectID.GetComponent<AkGameObj>() == null)
                {
                    in_ObjectID.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_ObjectID);
                tempin_ObjectID = (uint)tempObj.m_id;	//Silence warning
            }
        }
        else
        {
            tempin_ObjectID = unchecked((uint)-1);
        }

        {
          AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_GetObjectObstructionAndOcclusion(tempin_ObjectID, in_uListener, out out_rfObstructionLevel, out out_rfOcclusionLevel);

          return ret;
        }
    }
Esempio n. 14
0
    public static float GetMaxRadius(UnityEngine.GameObject in_GameObjId)
    {
        AkAutoObject tempObj = null;
        uint tempin_GameObjId;
        if ( in_GameObjId != null )
        {
            tempin_GameObjId = (uint)in_GameObjId.GetInstanceID();
            if (in_GameObjId.activeInHierarchy)
            {
                if (in_GameObjId.GetComponent<AkGameObj>() == null)
                {
                    in_GameObjId.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_GameObjId);
                tempin_GameObjId = (uint)tempObj.m_id;	//Silence warning
            }
        }
        else
        {
            tempin_GameObjId = unchecked((uint)-1);
        }

        {
          float ret = AkSoundEnginePINVOKE.CSharp_GetMaxRadius(tempin_GameObjId);

          return ret;
        }
    }
Esempio n. 15
0
    public static AKRESULT GetGameObjectAuxSendValues(UnityEngine.GameObject in_gameObjectID, AkAuxSendArray out_paAuxSendValues, ref uint io_ruNumSendValues)
    {
        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_GetGameObjectAuxSendValues(tempin_gameObjectID, out_paAuxSendValues.m_Buffer, ref io_ruNumSendValues);

          return ret;
        }
    }