diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs |
Diffstat (limited to 'Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs')
-rw-r--r-- | Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs b/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs new file mode 100644 index 0000000..feb438b --- /dev/null +++ b/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs @@ -0,0 +1,33 @@ +#if TESTING + +using UnityEngine; + +namespace UnityEngine.Graphs +{ + public class Testing + { + public class Object + { + public string name; + } + + public class ObjectSub1 : Object { } + public class ObjectSub2 : Object { } + + // fake animation curve. can't seem to be able to initialize real one out of Unity + public class AnimationCurve + { + public WrapMode postWrapMode; + public WrapMode preWrapMode; + public Keyframe[] keys; + public AnimationCurve(params Keyframe[] frames) { keys = frames; } + } + + public static bool AmIRunningInMono() + { + // internet says this is a supported way of detecting mono runtime + return System.Type.GetType ("Mono.Runtime") != null; + } + } +} +#endif |