remove IVRM10ConstraintSourceDestinationExtensions

This commit is contained in:
ousttrue
2021-05-18 13:15:32 +09:00
parent 962ee32385
commit 51d5144e34
3 changed files with 15 additions and 74 deletions

View File

@@ -1,59 +0,0 @@
using UnityEditor;
using UnityEngine;
namespace UniVRM10
{
public static class VRM10PositionRotationConstraintBaseExtensions
{
public static void DrawSourceCoords(this VRM10RotationPositionConstraintBase self)
{
try
{
self.GetSourceCoords().Draw(0.2f);
}
catch (ConstraintException)
{
}
}
public static void DrawSourceCurrent(this VRM10RotationPositionConstraintBase self)
{
try
{
Handles.matrix = self.GetSourceCurrent().TRS(0.05f);
Handles.color = Color.yellow;
Handles.DrawWireCube(Vector3.zero, Vector3.one);
}
catch (ConstraintException)
{
}
}
public static void DrawDstCoords(this VRM10RotationPositionConstraintBase self)
{
try
{
self.GetDstCoords().Draw(0.2f);
}
catch (ConstraintException)
{
}
}
public static void DrawDstCurrent(this VRM10RotationPositionConstraintBase self)
{
try
{
Handles.matrix = self.GetDstCurrent().TRS(0.05f);
Handles.color = Color.yellow;
Handles.DrawWireCube(Vector3.zero, Vector3.one);
}
catch (ConstraintException)
{
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 59e1ae1f9d4fb9a459cd2c97a4351b1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -104,10 +104,21 @@ namespace UniVRM10
Handles.Label(m_target.GetComponent().transform.position, sb.ToString(), Style);
}
m_target.DrawSourceCoords();
m_target.DrawSourceCurrent();
m_target.DrawDstCoords();
m_target.DrawDstCurrent();
m_target.GetSourceCoords().Draw(0.2f);
if (Application.isPlaying)
{
Handles.matrix = m_target.GetSourceCurrent().TRS(0.05f);
Handles.color = Color.yellow;
Handles.DrawWireCube(Vector3.zero, Vector3.one);
}
m_target.GetDstCoords().Draw(0.2f);
if (Application.isPlaying)
{
Handles.matrix = m_target.GetDstCurrent().TRS(0.05f);
Handles.color = Color.yellow;
Handles.DrawWireCube(Vector3.zero, Vector3.one);
}
}
}
}