diff --git a/Assets/Editor/Select_hash.cs b/Assets/Editor/Select_hash.cs new file mode 100644 index 0000000..ea7c361 --- /dev/null +++ b/Assets/Editor/Select_hash.cs @@ -0,0 +1,55 @@ +using UnityEngine; +using UnityEditor; + +class SelectAllOfTagHash : ScriptableWizard +{ + + string tagName = "ExampleTag"; + + + [MenuItem("Hash/Get Hash")] + static void SelectAllOfTagHashWizard() + { + ScriptableWizard.DisplayWizard( + "Hash/Get Hash", + typeof(SelectAllOfTagHash), + "Get Hash"); + } + + void OnWizardCreate() + { + //AssetDatabase.RemoveObjectFromAsset(Selection.objects[0]); + //AssetDatabase.CreateAsset(Selection.objects[0], "Assets/"+ Selection.objects[0].name + ".asset"); + + UnityEngine.GameObject obj = (GameObject)Selection.activeObject; + if (obj == null) + { + Debug.LogError("You must select GameObj first!"); + return; + } + string result = ""; + + var children = obj.GetComponentsInChildren(); + + foreach(var selectChild in children) + { + var tempChild = selectChild; + + if (tempChild != null && tempChild != obj.transform) + { + result = tempChild.name; + while (tempChild.parent != obj.transform && tempChild.parent != null) + { + tempChild = tempChild.parent; + result = string.Format("{0}/{1}", tempChild.name, result); + } + } + + + Debug.Log(string.Format("GameObject:{0}, Hash:{1}", result, (uint)Animator.StringToHash(result))); + } + + + + } +} \ No newline at end of file diff --git a/Assets/Editor/Select_hash.cs.meta b/Assets/Editor/Select_hash.cs.meta new file mode 100644 index 0000000..64fa19f --- /dev/null +++ b/Assets/Editor/Select_hash.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3d086c88fee2954d9cee0d1acca0969 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 06c4cd0..6ea1d22 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -159,7 +159,7 @@ public class UmaViewerUI : MonoBehaviour public void LoadModelPanels() { var container = Instantiate(UmaContainerPrefab, AnimationSetList.content).GetComponent(); - container.Name.text = container.name = "General"; + container.Name.text = container.name = "Generic"; var imageInstance = container.GetComponent(); container.Button.onClick.AddListener(() => { HighlightChildImage(AnimationSetList.content, imageInstance); @@ -495,7 +495,6 @@ public class UmaViewerUI : MonoBehaviour var filteredList = Main.AbList.Where(a => a.Name.StartsWith(UmaDatabaseController.MotionPath) && !a.Name.Contains($"mirror") && (mini ? a.Name.Contains($"mini") : !a.Name.Contains($"mini")) - && !a.Name.Contains($"facial") && !a.Name.Contains($"_cam") && !a.Name.EndsWith($"_s") && !a.Name.EndsWith($"_e")