88 lines
2.9 KiB
C#
88 lines
2.9 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Playables;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine.Animations
|
|
{
|
|
// Token: 0x020001F4 RID: 500
|
|
[RequiredByNativeCode]
|
|
public struct AnimationMixerPlayable : IPlayable, IEquatable<AnimationMixerPlayable>
|
|
{
|
|
// Token: 0x06002301 RID: 8961 RVA: 0x00028B38 File Offset: 0x00026D38
|
|
internal AnimationMixerPlayable(PlayableHandle handle)
|
|
{
|
|
if (handle.IsValid())
|
|
{
|
|
if (!handle.IsPlayableOfType<AnimationMixerPlayable>())
|
|
{
|
|
throw new InvalidCastException("Can't set handle: the playable is not an AnimationMixerPlayable.");
|
|
}
|
|
}
|
|
this.m_Handle = handle;
|
|
}
|
|
|
|
// Token: 0x06002302 RID: 8962 RVA: 0x00028B68 File Offset: 0x00026D68
|
|
public static AnimationMixerPlayable Create(PlayableGraph graph, int inputCount = 0, bool normalizeWeights = false)
|
|
{
|
|
PlayableHandle playableHandle = AnimationMixerPlayable.CreateHandle(graph, inputCount, normalizeWeights);
|
|
return new AnimationMixerPlayable(playableHandle);
|
|
}
|
|
|
|
// Token: 0x06002303 RID: 8963 RVA: 0x00028B8C File Offset: 0x00026D8C
|
|
private static PlayableHandle CreateHandle(PlayableGraph graph, int inputCount = 0, bool normalizeWeights = false)
|
|
{
|
|
PlayableHandle @null = PlayableHandle.Null;
|
|
PlayableHandle playableHandle;
|
|
if (!AnimationMixerPlayable.CreateHandleInternal(graph, inputCount, normalizeWeights, ref @null))
|
|
{
|
|
playableHandle = PlayableHandle.Null;
|
|
}
|
|
else
|
|
{
|
|
@null.SetInputCount(inputCount);
|
|
playableHandle = @null;
|
|
}
|
|
return playableHandle;
|
|
}
|
|
|
|
// Token: 0x06002304 RID: 8964 RVA: 0x00028BCC File Offset: 0x00026DCC
|
|
public PlayableHandle GetHandle()
|
|
{
|
|
return this.m_Handle;
|
|
}
|
|
|
|
// Token: 0x06002305 RID: 8965 RVA: 0x00028BE8 File Offset: 0x00026DE8
|
|
public static implicit operator Playable(AnimationMixerPlayable playable)
|
|
{
|
|
return new Playable(playable.GetHandle());
|
|
}
|
|
|
|
// Token: 0x06002306 RID: 8966 RVA: 0x00028C0C File Offset: 0x00026E0C
|
|
public static explicit operator AnimationMixerPlayable(Playable playable)
|
|
{
|
|
return new AnimationMixerPlayable(playable.GetHandle());
|
|
}
|
|
|
|
// Token: 0x06002307 RID: 8967 RVA: 0x00028C30 File Offset: 0x00026E30
|
|
public bool Equals(AnimationMixerPlayable other)
|
|
{
|
|
return this.GetHandle() == other.GetHandle();
|
|
}
|
|
|
|
// Token: 0x06002308 RID: 8968 RVA: 0x00028C58 File Offset: 0x00026E58
|
|
private static bool CreateHandleInternal(PlayableGraph graph, int inputCount, bool normalizeWeights, ref PlayableHandle handle)
|
|
{
|
|
return AnimationMixerPlayable.INTERNAL_CALL_CreateHandleInternal(ref graph, inputCount, normalizeWeights, ref handle);
|
|
}
|
|
|
|
// Token: 0x06002309 RID: 8969
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern bool INTERNAL_CALL_CreateHandleInternal(ref PlayableGraph graph, int inputCount, bool normalizeWeights, ref PlayableHandle handle);
|
|
|
|
// Token: 0x04000543 RID: 1347
|
|
private PlayableHandle m_Handle;
|
|
}
|
|
}
|