コード例 #1
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType) {
    
		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);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_0(tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), (int)in_eDynamicSequenceType);

      return ret;
    }
  }
コード例 #2
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType) {
    
		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);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_0(tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), (int)in_eDynamicSequenceType);

      return ret;
    }
  }
コード例 #3
0
    public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType)
    {
        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_0(tempin_gameObjectID, in_uFlags, in_uFlags != 0 ? (IntPtr)1 : (IntPtr)0, in_pCookie != null ? (IntPtr)in_pCookie.GetHashCode() : (IntPtr)0, (int)in_eDynamicSequenceType);
        AkCallbackManager.SetLastAddedPlayingID(ret);
        return ret;
        }
    }
コード例 #4
0
    public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType)
    {
        AkAutoObject tempObj = null;
        uint tempin_gameObjectID = (uint)AutoRegisterAkGameObj(in_gameObjectID, ref tempObj);

        in_pCookie = AkCallbackManager.EventCallbackPackage.Create(in_pfnCallback, in_pCookie, ref in_uFlags);
        {
        uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_0(tempin_gameObjectID, in_uFlags, in_uFlags != 0 ? (IntPtr)1 : (IntPtr)0, in_pCookie != null ? (IntPtr)in_pCookie.GetHashCode() : (IntPtr)0, (int)in_eDynamicSequenceType);
        AkCallbackManager.SetLastAddedPlayingID(ret);
        return ret;
        }
    }
コード例 #5
0
    public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType)
    {
        uint tempin_gameObjectID;
        if ( in_gameObjectID != null && in_gameObjectID.activeInHierarchy )
        {
            tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
            // Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
            if (in_gameObjectID.GetComponent<AkGameObj>() == null)
            {
                in_gameObjectID.AddComponent<AkGameObj>();
            }
        }
        else
        {
            tempin_gameObjectID = unchecked((uint)-1);
        }

        in_pCookie = AkCallbackManager.EventCallbackPackage.Create(in_pfnCallback, in_pCookie, ref in_uFlags);
        {
        uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_0(tempin_gameObjectID, in_uFlags, in_uFlags != 0 ? (IntPtr)1 : (IntPtr)0, in_pCookie != null ? (IntPtr)in_pCookie.GetHashCode() : (IntPtr)0, (int)in_eDynamicSequenceType);
        AkCallbackManager.SetLastAddedPlayingID(ret);
        return ret;
        }
    }