mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-03 11:46:02 -05:00
* Assets/UniHumanoid/Scripts => Assets/UniGLTF/Runtime/Humanoid * Assets/UniHumanoid/Editor => Assets/UniGLTF/Editor/Humanoid * Assets/UniHumanoid/Editor/Tests => Assets/UniGLTF/Tests/Humanoid * => docs/unihumanoid/index.md
29 lines
672 B
C#
29 lines
672 B
C#
using UnityEngine;
|
|
|
|
|
|
namespace UniHumanoid
|
|
{
|
|
public class BoneGizmoDrawer : MonoBehaviour
|
|
{
|
|
const float size = 0.03f;
|
|
readonly Vector3 SIZE = new Vector3(size, size, size);
|
|
|
|
[SerializeField]
|
|
public bool Draw = true;
|
|
|
|
void OnDrawGizmos()
|
|
{
|
|
#if UNITY_EDITOR
|
|
if (Draw && transform.parent != null)
|
|
{
|
|
Gizmos.color = Color.yellow;
|
|
Gizmos.DrawCube(transform.position, SIZE);
|
|
Gizmos.DrawLine(transform.parent.position, transform.position);
|
|
|
|
UnityEditor.Handles.Label(transform.position, name);
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
}
|