public static AudioPlayableOutput Create(PlayableGraph graph, string name, AudioSource target) { PlayableOutputHandle handle; if (!AudioPlayableGraphExtensions.InternalCreateAudioOutput(ref graph, name, out handle)) { return(AudioPlayableOutput.Null); } AudioPlayableOutput output = new AudioPlayableOutput(handle); output.SetTarget(target); return(output); }
public static AudioPlayableOutput Create(PlayableGraph graph, string name, AudioSource target) { PlayableOutputHandle handle; AudioPlayableOutput result; if (!AudioPlayableGraphExtensions.InternalCreateAudioOutput(ref graph, name, out handle)) { result = AudioPlayableOutput.Null; } else { AudioPlayableOutput audioPlayableOutput = new AudioPlayableOutput(handle); audioPlayableOutput.SetTarget(target); result = audioPlayableOutput; } return(result); }