private static void DoActionOnEvent(string eventName, AkActionOnEventType action, int fadeout) { uint eventID = AkSoundEngine.GetIDFromString(eventName); //default curve of event action is log, but can change later AkSoundEngine.ExecuteActionOnEvent(eventID, action, Instance.gameObject, fadeout, AkCurveInterpolation.AkCurveInterpolation_Log1); AkSoundEngine.RenderAudio(); }
/// <summary> /// Executes various actions on this event associated with a GameObject. /// </summary> /// <param name="gameObject">The GameObject</param> /// <param name="actionOnEventType"></param> /// <param name="transitionDuration"></param> /// <param name="curveInterpolation"></param> public void ExecuteAction(GameObject gameObject, AkActionOnEventType actionOnEventType, int transitionDuration, AkCurveInterpolation curveInterpolation) { if (IsValid()) { AKRESULT result = AkSoundEngine.ExecuteActionOnEvent(GetID(), actionOnEventType, gameObject, transitionDuration, curveInterpolation); Verify(result); } }
/// <summary> /// Executes various actions on this event associated with a GameObject. /// </summary> /// <param name="gameObject">The GameObject</param> /// <param name="actionOnEventType"></param> /// <param name="transitionDuration"></param> /// <param name="curveInterpolation"></param> public void ExecuteAction(UnityEngine.GameObject gameObject, AkActionOnEventType actionOnEventType, int transitionDuration, AkCurveInterpolation curveInterpolation) { if (IsValid()) { var result = AkSoundEngine.ExecuteActionOnEvent(Id, actionOnEventType, gameObject, transitionDuration, curveInterpolation); Verify(result); } }
/// <summary> /// Executes various actions on this event associated with a GameObject. /// </summary> /// <param name="gameObject">The GameObject</param> /// <param name="actionOnEventType"></param> /// <param name="transitionDuration"></param> /// <param name="curveInterpolation"></param> public void ExecuteAction(UnityEngine.GameObject gameObject, AkActionOnEventType actionOnEventType, int transitionDuration, AkCurveInterpolation curveInterpolation) { if (IsValid()) { #if AK_WWISE_ADDRESSABLES && UNITY_ADDRESSABLES var args = new object[] { gameObject, actionOnEventType, transitionDuration, curveInterpolation }; var argTypes = new System.Type[] { gameObject.GetType(), actionOnEventType.GetType(), transitionDuration.GetType(), curveInterpolation.GetType() }; if (!AkAddressableBankManager.Instance.LoadedBankContainsEvent(Name, Id, this, "ExecuteAction", argTypes, args)) { return; } #endif var result = AkSoundEngine.ExecuteActionOnEvent(Id, actionOnEventType, gameObject, transitionDuration, curveInterpolation); Verify(result); } }
public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration) { 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_ExecuteActionOnEvent__SWIG_2(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration); return ret; } }
public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType) { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_9(in_pszEventName, (int)in_ActionType); return ret; }
public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType) { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_4(in_eventID, (int)in_ActionType); return ret; }
public static void ExecuteActionOnEvent(string name, AkActionOnEventType action, GameObject g) { AkSoundEngine.ExecuteActionOnEvent(name, action, g); }
public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID) { 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_ExecuteActionOnEvent__SWIG_8(in_pszEventName, (int)in_ActionType, tempin_gameObjectID); return ret; } }
public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve) { 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_ExecuteActionOnEvent__SWIG_1(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve); return ret; } }
public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID) { AkAutoObject tempObj = null; uint tempin_gameObjectID = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj); { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_8(in_pszEventName, (int)in_ActionType, tempin_gameObjectID); return ret; } }
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 = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj); { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_6(in_pszEventName, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve); return ret; } }
public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, UnityEngine.GameObject in_gameObjectID, int in_uTransitionDuration) { AkAutoObject tempObj = null; uint tempin_gameObjectID = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj); { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_2(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration); return ret; } }
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; } }
public static AKRESULT ExecuteActionOnEvent(string in_pszEventName, AkActionOnEventType in_ActionType, ComponentBind.Entity in_gameObjectID, int in_uTransitionDuration) { uint tempin_gameObjectID; if ( in_gameObjectID != null ) { tempin_gameObjectID = getGameObjectID(in_gameObjectID); // Note: if AkGameObjectTracker is already attached, the following code will be bypassed. if (in_gameObjectID.Get<AkGameObject>() == null) { in_gameObjectID.Add(new AkGameObject()); } } else { tempin_gameObjectID = unchecked((uint)-1); } { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_7(in_pszEventName, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration); return ret; } }
public static AKRESULT ExecuteActionOnEvent(uint in_eventID, AkActionOnEventType in_ActionType, ComponentBind.Entity in_gameObjectID, int in_uTransitionDuration, AkCurveInterpolation in_eFadeCurve, uint in_PlayingID) { uint tempin_gameObjectID; if ( in_gameObjectID != null ) { tempin_gameObjectID = (uint)in_gameObjectID.ID.GetHashCode(); // Note: if AkGameObjectTracker is already attached, the following code will be bypassed. if (in_gameObjectID.Get<AkGameObject>() == null) { in_gameObjectID.Add(new AkGameObject()); } } else { tempin_gameObjectID = unchecked((uint)-1); } { AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_ExecuteActionOnEvent__SWIG_0(in_eventID, (int)in_ActionType, tempin_gameObjectID, in_uTransitionDuration, (int)in_eFadeCurve, in_PlayingID); return ret; } }