You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
653 B
C#
27 lines
653 B
C#
6 months ago
|
using Autohand;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEditor;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Autohand {
|
||
|
[CustomEditor(typeof(Finger))]
|
||
|
public class FingerEditor : Editor {
|
||
|
Finger finger;
|
||
|
float lastOffset;
|
||
|
|
||
|
private void OnEnable() {
|
||
|
finger = target as Finger;
|
||
|
lastOffset = finger.bendOffset;
|
||
|
}
|
||
|
|
||
|
public override void OnInspectorGUI() {
|
||
|
DrawDefaultInspector();
|
||
|
if(lastOffset != finger.bendOffset){
|
||
|
lastOffset = finger.bendOffset;
|
||
|
finger.SetFingerBend(lastOffset);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|