summaryrefslogtreecommitdiff
path: root/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs
blob: feb438b519c4f869171dbbf78b2fd633168a66be (plain)
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
#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