forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlendTree.bindings.cs
More file actions
131 lines (112 loc) · 4.22 KB
/
BlendTree.bindings.cs
File metadata and controls
131 lines (112 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using UnityEngine;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections;
using UnityEditor;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
namespace UnityEditor.Animations
{
public enum BlendTreeType
{
Simple1D = 0 ,
SimpleDirectional2D = 1,
FreeformDirectional2D = 2,
FreeformCartesian2D = 3,
Direct = 4
}
[NativeType("Editor/Src/Animation/BlendTree.h")]
[StructLayout(LayoutKind.Sequential)]
public struct ChildMotion
{
public Motion motion { get { return m_Motion; } set { m_Motion = value; } }
public float threshold { get { return m_Threshold; } set { m_Threshold = value; } }
public Vector2 position { get { return m_Position; } set { m_Position = value; } }
public float timeScale { get { return m_TimeScale; } set { m_TimeScale = value; } }
public float cycleOffset { get { return m_CycleOffset; } set { m_CycleOffset = value; } }
public string directBlendParameter { get { return m_DirectBlendParameter; } set { m_DirectBlendParameter = value; }}
public bool mirror { get { return m_Mirror; } set { m_Mirror = value; } }
Motion m_Motion;
float m_Threshold;
Vector2 m_Position;
float m_TimeScale;
float m_CycleOffset;
string m_DirectBlendParameter;
bool m_Mirror;
}
[NativeHeader("Editor/Src/Animation/BlendTree.bindings.h")]
[NativeType("Editor/Src/Animation/BlendTree.h")]
public partial class BlendTree : Motion
{
public BlendTree()
{
Internal_Create(this);
}
[FreeFunction("BlendTreeBindings::Internal_Create")]
extern private static void Internal_Create([Writable] BlendTree self);
extern public string blendParameter
{
get;
set;
}
extern public string blendParameterY
{
get;
set;
}
extern public BlendTreeType blendType
{
get;
set;
}
extern public ChildMotion[] children
{
get;
set;
}
extern internal int GetChildMotionCount();
internal Motion GetChildMotion(int index)
{
if (index < 0 && index >= GetChildMotionCount())
throw new ArgumentOutOfRangeException("index");
return Internal_GetChildMotion(index);
}
[NativeMethod("GetChildMotion")]
extern internal Motion Internal_GetChildMotion(int index);
[NativeMethod("SetDirectBlendParameter")]
extern internal void SetDirectBlendTreeParameter(int index, string parameter);
[NativeMethod("GetDirectBlendParameter")]
extern internal string GetDirectBlendTreeParameter(int index);
extern public bool useAutomaticThresholds
{
get;
set;
}
extern public float minThreshold
{
get;
set;
}
extern public float maxThreshold
{
get;
set;
}
extern internal void SortChildren();
extern internal int recursiveBlendParameterCount
{
get;
}
extern internal string GetRecursiveBlendParameter(int index);
extern internal float GetRecursiveBlendParameterMin(int index);
extern internal float GetRecursiveBlendParameterMax(int index);
extern internal void SetInputBlendValue(string blendValueName, float value);
extern internal float GetInputBlendValue(string blendValueName);
[NativeMethod("GetAnimationClips")]
extern internal AnimationClip[] GetAnimationClipsFlattened();
}
}