AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
AnimationCurveDefaultAttribute.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using System;
5 using System.Reflection;
6 using UnityEngine;
7 #if UNITY_EDITOR
8 using UnityEditor;
9 #endif
10 
11 namespace HoloToolkit.Unity
12 {
13  // Adds a 'default' button to an animation curve that will supply default curve values
14  [AttributeUsage(AttributeTargets.Field)]
16  {
17  public WrapMode PostWrap { get; private set; }
18  public Keyframe StartVal { get; private set; }
19  public Keyframe EndVal { get; private set; }
20 
21  public AnimationCurveDefaultAttribute(Keyframe startVal, Keyframe endVal, WrapMode postWrap = WrapMode.Loop)
22  {
23  PostWrap = postWrap;
24  StartVal = startVal;
25  EndVal = endVal;
26  }
27 
28 #if UNITY_EDITOR
29  public override void DrawEditor(UnityEngine.Object target, FieldInfo field, SerializedProperty property)
30  {
31  throw new NotImplementedException();
32  }
33 
34  public override void DrawEditor(UnityEngine.Object target, PropertyInfo prop)
35  {
36  throw new NotImplementedException();
37  }
38 #endif
39 
40  }
41 }
AnimationCurveDefaultAttribute(Keyframe startVal, Keyframe endVal, WrapMode postWrap=WrapMode.Loop)