AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
AnimatorParameter.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 UnityEngine;
6 
7 namespace HoloToolkit.Unity.InputModule
8 {
13  [Serializable]
14  public struct AnimatorParameter
15  {
16  [Tooltip("Type of the animation parameter to modify.")]
17  public AnimatorControllerParameterType Type;
18 
19  [Tooltip("If the animation parameter type is an int, value to set. Ignored otherwise.")]
20  public int DefaultInt;
21 
22  [Tooltip("If the animation parameter type is a float, value to set. Ignored otherwise.")]
23  public float DefaultFloat;
24 
25  [Tooltip("If the animation parameter type is a bool, value to set. Ignored otherwise.")]
26  public bool DefaultBool;
27 
28  [Tooltip("Name of the animation parameter to modify.")]
29  public string Name;
30 
31  private int? nameStringHash;
32  public int NameHash
33  {
34  get
35  {
36  if (!nameStringHash.HasValue && !string.IsNullOrEmpty(Name))
37  {
38  nameStringHash = Animator.StringToHash(Name);
39  }
40  return nameStringHash.Value;
41  }
42  }
43  }
44 }
Created a copy of the AnimatorControllerParameter because that class is not Serializable and cannot b...