scripts
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Playables;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine.Audio
|
||||
{
|
||||
// Token: 0x020001C9 RID: 457
|
||||
[RequiredByNativeCode]
|
||||
public struct AudioPlayableOutput : IPlayableOutput
|
||||
{
|
||||
// Token: 0x06002125 RID: 8485 RVA: 0x000274F8 File Offset: 0x000256F8
|
||||
internal AudioPlayableOutput(PlayableOutputHandle handle)
|
||||
{
|
||||
if (handle.IsValid())
|
||||
{
|
||||
if (!handle.IsPlayableOutputOfType<AudioPlayableOutput>())
|
||||
{
|
||||
throw new InvalidCastException("Can't set handle: the playable is not an AudioPlayableOutput.");
|
||||
}
|
||||
}
|
||||
this.m_Handle = handle;
|
||||
}
|
||||
|
||||
// Token: 0x06002126 RID: 8486 RVA: 0x00027528 File Offset: 0x00025728
|
||||
public static AudioPlayableOutput Create(PlayableGraph graph, string name, AudioSource target)
|
||||
{
|
||||
PlayableOutputHandle playableOutputHandle;
|
||||
AudioPlayableOutput audioPlayableOutput;
|
||||
if (!AudioPlayableGraphExtensions.InternalCreateAudioOutput(ref graph, name, out playableOutputHandle))
|
||||
{
|
||||
audioPlayableOutput = AudioPlayableOutput.Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
AudioPlayableOutput audioPlayableOutput2 = new AudioPlayableOutput(playableOutputHandle);
|
||||
audioPlayableOutput2.SetTarget(target);
|
||||
audioPlayableOutput = audioPlayableOutput2;
|
||||
}
|
||||
return audioPlayableOutput;
|
||||
}
|
||||
|
||||
// Token: 0x170007BC RID: 1980
|
||||
// (get) Token: 0x06002127 RID: 8487 RVA: 0x00027568 File Offset: 0x00025768
|
||||
public static AudioPlayableOutput Null
|
||||
{
|
||||
get
|
||||
{
|
||||
return new AudioPlayableOutput(PlayableOutputHandle.Null);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002128 RID: 8488 RVA: 0x00027588 File Offset: 0x00025788
|
||||
public PlayableOutputHandle GetHandle()
|
||||
{
|
||||
return this.m_Handle;
|
||||
}
|
||||
|
||||
// Token: 0x06002129 RID: 8489 RVA: 0x000275A4 File Offset: 0x000257A4
|
||||
public static implicit operator PlayableOutput(AudioPlayableOutput output)
|
||||
{
|
||||
return new PlayableOutput(output.GetHandle());
|
||||
}
|
||||
|
||||
// Token: 0x0600212A RID: 8490 RVA: 0x000275C8 File Offset: 0x000257C8
|
||||
public static explicit operator AudioPlayableOutput(PlayableOutput output)
|
||||
{
|
||||
return new AudioPlayableOutput(output.GetHandle());
|
||||
}
|
||||
|
||||
// Token: 0x0600212B RID: 8491 RVA: 0x000275EC File Offset: 0x000257EC
|
||||
public AudioSource GetTarget()
|
||||
{
|
||||
return AudioPlayableOutput.InternalGetTarget(ref this.m_Handle);
|
||||
}
|
||||
|
||||
// Token: 0x0600212C RID: 8492 RVA: 0x0002760C File Offset: 0x0002580C
|
||||
public void SetTarget(AudioSource value)
|
||||
{
|
||||
AudioPlayableOutput.InternalSetTarget(ref this.m_Handle, value);
|
||||
}
|
||||
|
||||
// Token: 0x0600212D RID: 8493 RVA: 0x0002761C File Offset: 0x0002581C
|
||||
private static AudioSource InternalGetTarget(ref PlayableOutputHandle output)
|
||||
{
|
||||
return AudioPlayableOutput.INTERNAL_CALL_InternalGetTarget(ref output);
|
||||
}
|
||||
|
||||
// Token: 0x0600212E RID: 8494
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern AudioSource INTERNAL_CALL_InternalGetTarget(ref PlayableOutputHandle output);
|
||||
|
||||
// Token: 0x0600212F RID: 8495 RVA: 0x00027638 File Offset: 0x00025838
|
||||
private static void InternalSetTarget(ref PlayableOutputHandle output, AudioSource target)
|
||||
{
|
||||
AudioPlayableOutput.INTERNAL_CALL_InternalSetTarget(ref output, target);
|
||||
}
|
||||
|
||||
// Token: 0x06002130 RID: 8496
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_InternalSetTarget(ref PlayableOutputHandle output, AudioSource target);
|
||||
|
||||
// Token: 0x040004E0 RID: 1248
|
||||
private PlayableOutputHandle m_Handle;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user