上传YomovSDK
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEditor;
|
||||
|
||||
namespace RootMotion.Demos {
|
||||
|
||||
/// <summary>
|
||||
/// Scene view helper for the LimbIK BendGoal
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(BendGoal))]
|
||||
public class BendGoalInspector : Editor {
|
||||
|
||||
private BendGoal script { get { return target as BendGoal; }}
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
DrawDefaultInspector();
|
||||
}
|
||||
|
||||
void OnSceneGUI() {
|
||||
if (script.limbIK == null) return;
|
||||
if (script.limbIK.solver.bone2 == null) return;
|
||||
if (script.limbIK.solver.bone2.transform == null) return;
|
||||
|
||||
Handles.color = Color.cyan;
|
||||
|
||||
Vector3 bonePosition = script.limbIK.solver.bone2.transform.position;
|
||||
Handles.DrawLine(script.transform.position, bonePosition);
|
||||
Inspector.SphereCap(0, script.transform.position, Quaternion.identity, 0.05f);
|
||||
Inspector.SphereCap(0, bonePosition, Quaternion.identity, 0.025f);
|
||||
|
||||
Handles.color = Color.white;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 684cc44fa10474fefa6a837d949e7449
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user