diff --git a/Assets/VRM10/Editor/Components/Constraint/IVRM10ConstraintSourceDestinationExtensions.cs b/Assets/VRM10/Editor/Components/Constraint/IVRM10ConstraintSourceDestinationExtensions.cs deleted file mode 100644 index 2fc95decd..000000000 --- a/Assets/VRM10/Editor/Components/Constraint/IVRM10ConstraintSourceDestinationExtensions.cs +++ /dev/null @@ -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) - { - - } - } - } -} diff --git a/Assets/VRM10/Editor/Components/Constraint/IVRM10ConstraintSourceDestinationExtensions.cs.meta b/Assets/VRM10/Editor/Components/Constraint/IVRM10ConstraintSourceDestinationExtensions.cs.meta deleted file mode 100644 index a2836e116..000000000 --- a/Assets/VRM10/Editor/Components/Constraint/IVRM10ConstraintSourceDestinationExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 59e1ae1f9d4fb9a459cd2c97a4351b1f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/VRM10/Editor/Components/Constraint/VRM10PostionRotationConstraintEditorBase.cs b/Assets/VRM10/Editor/Components/Constraint/VRM10PostionRotationConstraintEditorBase.cs index 35b6f5f50..e058dfb73 100644 --- a/Assets/VRM10/Editor/Components/Constraint/VRM10PostionRotationConstraintEditorBase.cs +++ b/Assets/VRM10/Editor/Components/Constraint/VRM10PostionRotationConstraintEditorBase.cs @@ -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); + } } } }