示例#1
0
 /// <summary>
 /// Finds an audio node based on the ID specified
 /// </summary>
 /// <param name="id">The id to search for</param>
 /// <returns>The found bus, null if not found</returns>
 public static InAudioNode FindAudioNodeById(int id)
 {
     if (instance != null)
     {
         return(TreeWalker.FindById(InAudioInstanceFinder.DataManager.AudioTree, id));
     }
     else
     {
         InDebug.LogWarning("InAudio: Could not bus with id " + id);
     }
     return(null);
 }
示例#2
0
 /// <summary>
 /// Check if a bus is muted
 /// </summary>
 /// <param name="bus">The bus</param>
 /// <param name="mute">to mute or unmute</param>
 public static void IsBusMuted(InAudioBus bus, bool mute)
 {
     if (bus != null)
     {
         bus.Dirty       = true;
         bus.RuntimeMute = mute;
     }
     else
     {
         InDebug.LogWarning("Bus instance not set to an instance in mute");
     }
 }
示例#3
0
    /// <summary>
    /// Find an Audio Event by id so it can be posted directly
    /// </summary>
    /// <param name="id">The ID of the event to post. The ID is found in the InAudio Event window</param>
    /// <returns>The found audio event. Returns null if not found</returns>
    public static InAudioEventNode FindEventByID(int id)
    {
        InAudioEventNode postEvent = null;

        if (instance != null)
        {
            instance.runtimeData.Events.TryGetValue(id, out postEvent);
        }
        else
        {
            InDebug.LogWarning("InAudio: Could not try to find event with id " + id + " as no InAudio instance was found");
        }
        return(postEvent);
    }