Esempio n. 1
0
    void CreateAuxBus(Guid componentGuid, int ID)
    {
        AkEnvironment[] akEnvironments = gameObject.GetComponents <AkEnvironment>();

        bool found = false;

        for (int i = 0; i < akEnvironments.Length; i++)
        {
            if (new Guid(akEnvironments[i].valueGuid) == componentGuid)
            {
                found = true;
                break;
            }
        }

        if (found == false)
        {
            AkEnvironment akEnvironment = Undo.AddComponent <AkEnvironment>(gameObject);
            if (akEnvironment != null)
            {
                akEnvironment.valueGuid = componentGuid.ToByteArray();
                akEnvironment.SetAuxBusID(ID);
            }
        }
    }
Esempio n. 2
0
    public void ChangeBus(BusName bus, ref AkEnvironment env)
    {
        string busName = System.Enum.GetName(typeof(BusName), bus);
        int    id      = (int)AkSoundEngine.GetIDFromString(busName);

        env.SetAuxBusID(id);
    }