diff --git a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs index ae7c20cc6..096b3ebee 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs @@ -111,7 +111,7 @@ namespace UniVRM10.Cloth.Viewer static bool TryAddGroupChildChild( Animator animator, HumanBodyBones humanBone, string[] targets, string[] excludes, - out List group) + out List group) { var bone = animator.GetBoneTransform(humanBone); if (bone == null) @@ -121,7 +121,7 @@ namespace UniVRM10.Cloth.Viewer return false; } - List transforms = new(); + List transforms = new(); foreach (Transform child in bone) { foreach (Transform childchild in child) @@ -135,7 +135,7 @@ namespace UniVRM10.Cloth.Viewer { if (childchild.name.ToLower().Contains(target.ToLower())) { - var warp = childchild.gameObject.AddComponent(); + var warp = childchild.gameObject.AddComponent(); // Name = name, // CollisionMask = mask, warp.BaseSettings.radius = 0.02f; @@ -158,7 +158,7 @@ namespace UniVRM10.Cloth.Viewer } static bool TryAddGroup(Animator animator, HumanBodyBones humanBone, string[] targets, - out List group) + out List group) { var bone = animator.GetBoneTransform(humanBone); if (bone == null) @@ -168,14 +168,14 @@ namespace UniVRM10.Cloth.Viewer return false; } - List transforms = new(); + List transforms = new(); foreach (Transform child in bone) { foreach (var target in targets) { if (child.name.ToLower().Contains(target.ToLower())) { - var warp = child.gameObject.AddComponent(); + var warp = child.gameObject.AddComponent(); if (warp != null) { // CollisionMask = mask, diff --git a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs index 26701e611..d6ab9d6c4 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs @@ -392,7 +392,7 @@ namespace UniVRM10.Cloth.Viewer if (vrm.SpringBone.ColliderGroups.Count == 0) { HumanoidCollider.AddColliders(animator); - var warps = animator.GetComponentsInChildren(); + var warps = animator.GetComponentsInChildren(); var colliderGroups = animator.GetComponentsInChildren(); foreach (var warp in warps) { @@ -403,7 +403,7 @@ namespace UniVRM10.Cloth.Viewer else { ClothWarpRuntimeProvider.FromVrm10(vrm, - go => go.AddComponent(), + go => go.AddComponent(), o => GameObject.DestroyImmediate(o)); } diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/RotateParticleRuntimeProviderEditor.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/RotateParticleRuntimeProviderEditor.cs index f471b432f..49c93766a 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/RotateParticleRuntimeProviderEditor.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/RotateParticleRuntimeProviderEditor.cs @@ -39,7 +39,7 @@ namespace ClothWarpLib.Components var undo = Undo.GetCurrentGroup(); Undo.RegisterCompleteObjectUndo(instance, "RegisterCompleteObjectUndo"); - ClothWarpRuntimeProvider.FromVrm10(instance, Undo.AddComponent, Undo.DestroyObjectImmediate); + ClothWarpRuntimeProvider.FromVrm10(instance, Undo.AddComponent, Undo.DestroyObjectImmediate); Undo.RegisterFullObjectHierarchyUndo(instance.gameObject, "RegisterFullObjectHierarchyUndo"); Undo.RegisterCompleteObjectUndo(provider, "RegisterCompleteObjectUndo"); diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/WarpRootEditor.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/WarpRootEditor.cs index c4395c60f..6274b4033 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/WarpRootEditor.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/WarpRootEditor.cs @@ -9,10 +9,10 @@ using UniVRM10; namespace ClothWarpLib.Components { - [CustomEditor(typeof(ClothWarp))] + [CustomEditor(typeof(ClothWarpRoot))] class WarpRootEditor : Editor { - private ClothWarp m_target; + private ClothWarpRoot m_target; private Vrm10Instance m_vrm; private MultiColumnTreeView m_treeview; @@ -23,7 +23,7 @@ namespace ClothWarpLib.Components return; } - m_target = (ClothWarp)target; + m_target = (ClothWarpRoot)target; m_vrm = m_target.GetComponentInParent(); } @@ -85,14 +85,14 @@ namespace ClothWarpLib.Components s.SetEnabled(false); root.Add(s); } - root.Add(new PropertyField { bindingPath = nameof(ClothWarp.BaseSettings) }); - root.Add(new PropertyField { bindingPath = nameof(ClothWarp.Center) }); + root.Add(new PropertyField { bindingPath = nameof(ClothWarpRoot.BaseSettings) }); + root.Add(new PropertyField { bindingPath = nameof(ClothWarpRoot.Center) }); // root.Add(new PropertyField { bindingPath = "m_particles" }); { Func isCustom = (i) => { - return m_target.Particles[i].Mode == ClothWarp.ParticleMode.Custom; + return m_target.Particles[i].Mode == ClothWarpRoot.ParticleMode.Custom; }; m_treeview = new MultiColumnTreeView(); @@ -109,7 +109,7 @@ namespace ClothWarpLib.Components root.Add(m_treeview); } - root.Add(new PropertyField { bindingPath = nameof(ClothWarp.ColliderGroups) }); + root.Add(new PropertyField { bindingPath = nameof(ClothWarpRoot.ColliderGroups) }); return root; } @@ -142,7 +142,7 @@ namespace ClothWarpLib.Components return; } - if (item is ClothWarp.Particle p) + if (item is ClothWarpRoot.Particle p) { p = m_target.GetParticleFromTransform(p.Transform); var t = p.Transform; diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ClothWarpRuntime.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ClothWarpRuntime.cs index da0f48235..525d2ada1 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ClothWarpRuntime.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ClothWarpRuntime.cs @@ -71,8 +71,8 @@ namespace ClothWarpLib } _initialized = false; - var strandMap = new Dictionary(); - var warps = vrm.GetComponentsInChildren(); + var strandMap = new Dictionary(); + var warps = vrm.GetComponentsInChildren(); foreach (var warp in warps) { var strands = new List(); diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothGrid.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothGrid.cs index 3d7ddf7c9..3472adc36 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothGrid.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothGrid.cs @@ -12,14 +12,14 @@ namespace ClothWarpLib.Components public bool LoopIsClosed = false; [SerializeField] - public List Warps = new(); + public List Warps = new(); public void Reset() { for (int i = 0; i < transform.childCount; ++i) { var child = transform.GetChild(i); - if (child.TryGetComponent(out var warp)) + if (child.TryGetComponent(out var warp)) { Warps.Add(warp); } @@ -51,7 +51,7 @@ namespace ClothWarpLib.Components } } - void DrawWeft(ClothWarp w0, ClothWarp w1) + void DrawWeft(ClothWarpRoot w0, ClothWarpRoot w1) { if (w0 == null || w1 == null) { diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarp.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRoot.cs similarity index 98% rename from Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarp.cs rename to Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRoot.cs index f4e7e2f6b..0f0b4b77f 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarp.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRoot.cs @@ -9,13 +9,13 @@ using UniVRM10; namespace ClothWarpLib.Components { - [AddComponentMenu("ClothWarp/ClothWarp")] + [AddComponentMenu("ClothWarp/ClothWarpRoot")] [DisallowMultipleComponent] /// /// Warp の root にアタッチする。 /// 子孫の Transform がすべて登録される。 /// - public class ClothWarp : MonoBehaviour + public class ClothWarpRoot : MonoBehaviour { public static BlittableJointMutable DefaultSetting() { diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarp.cs.meta b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRoot.cs.meta similarity index 100% rename from Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarp.cs.meta rename to Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRoot.cs.meta diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs index b69a7d639..0b400e8de 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Components/ClothWarpRuntimeProvider.cs @@ -11,7 +11,7 @@ namespace ClothWarpLib.Components public class ClothWarpRuntimeProvider : MonoBehaviour, IVrm10SpringBoneRuntimeProvider { [SerializeField] - public List Warps = new(); + public List Warps = new(); [SerializeField] public List Cloths = new(); @@ -31,7 +31,7 @@ namespace ClothWarpLib.Components public void Reset() { - Warps = GetComponentsInChildren().ToList(); + Warps = GetComponentsInChildren().ToList(); Cloths = GetComponentsInChildren().ToList(); } @@ -45,7 +45,7 @@ namespace ClothWarpLib.Components } public static void FromVrm10(Vrm10Instance instance, - Func addWarp, + Func addWarp, Action deleteObject) { foreach (var spring in instance.SpringBone.Springs) @@ -61,7 +61,7 @@ namespace ClothWarpLib.Components continue; } - var warp = root_joint.GetComponent(); + var warp = root_joint.GetComponent(); if (warp == null) { // var warp = Undo.AddComponent(root_joint); diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/ClothWarpJobRuntime.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/ClothWarpJobRuntime.cs index 40c779498..750604a21 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/ClothWarpJobRuntime.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/Jobs/ClothWarpJobRuntime.cs @@ -135,7 +135,7 @@ namespace ClothWarpLib.Jobs List info = new(); List positions = new(); List warps = new(); - var warpSrcs = vrm.GetComponentsInChildren(); + var warpSrcs = vrm.GetComponentsInChildren(); for (int warpIndex = 0; warpIndex < warpSrcs.Length; ++warpIndex) { var warp = warpSrcs[warpIndex]; @@ -173,7 +173,7 @@ namespace ClothWarpLib.Jobs var parentIndex = warpRootTransformIndex.index; foreach (var particle in warp.Particles) { - if (particle.Transform != null && particle.Mode != Components.ClothWarp.ParticleMode.Disabled) + if (particle.Transform != null && particle.Mode != Components.ClothWarpRoot.ParticleMode.Disabled) { var outputParticleTransformIndex = GetTransformIndex((Transform)particle.Transform, new TransformInfo { diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ParticleList.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ParticleList.cs index ef4aafa1d..8a8a3a92c 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ParticleList.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/ParticleList.cs @@ -12,7 +12,7 @@ namespace ClothWarpLib public List _particles = new(); public List _particleTransforms = new(); - public Strand MakeParticleStrand(SimulationEnv env, Components.ClothWarp warp) + public Strand MakeParticleStrand(SimulationEnv env, Components.ClothWarpRoot warp) { var strand = new Strand();