Tanoda
SetAnimatorParamEditor.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10using UnityEditor;
11
12namespace Leap.Unity.Recording {
13
14 [CanEditMultipleObjects]
15 [CustomEditor(typeof(SetAnimatorParam))]
16 public class SetAnimatorParamEditor : CustomEditorBase<SetAnimatorParam> {
17
18 protected override void OnEnable() {
19 base.OnEnable();
20
21 specifyConditionalDrawing("_type", (int)AnimatorControllerParameterType.Bool, "_boolValue");
22 specifyConditionalDrawing("_type", (int)AnimatorControllerParameterType.Int, "_intValue");
23 specifyConditionalDrawing("_type", (int)AnimatorControllerParameterType.Float, "_floatValue");
24 }
25 }
26}
void specifyConditionalDrawing(string conditionalName, params string[] dependantProperties)
Specify a list of properties that should only be displayed if the conditional property has a value of...