fix: remove some leftover bits of the outfit menu system

This commit is contained in:
bd_ 2023-06-19 20:04:07 +09:00
parent cdb5ede7fe
commit 1965389904
11 changed files with 0 additions and 529 deletions

View File

@ -1,70 +0,0 @@
using nadena.dev.modular_avatar.core;
using nadena.dev.modular_avatar.core.editor;
using UnityEditor;
using UnityEngine;
using VRC.SDK3.Avatars.Components;
namespace nadena.dev.modular_avatar.core.editor
{
internal static class AddOutfitMenu
{
private static readonly GameObject PREFAB_OUTFIT_MENU =
Util.LoadAssetByGuid<GameObject>("2097228906bdff44fb40a3d9f39cf599");
private static readonly string PATH_OUTFIT_MENU = AssetDatabase.GetAssetPath(PREFAB_OUTFIT_MENU);
[MenuItem("GameObject/ModularAvatar/Add outfit menu", false, 49)]
internal static void CommandAddOutfitMenu(MenuCommand menuCommand)
{
if (!(menuCommand.context is GameObject gameObj)) return;
var avatar = gameObj.GetComponent<VRCAvatarDescriptor>();
if (avatar == null || avatar.expressionsMenu == null) return;
// Do we have a top-level menu we can install into?
// For our heuristic purposes we only look at menus at the top level of the avatar, where the avatar's own
// menu is empty.
GameObject topLevelMenu = null;
if (avatar.expressionsMenu?.controls?.Count == 0)
{
foreach (Transform t in avatar.transform)
{
var installer = t.GetComponent<ModularAvatarMenuInstaller>();
var group = t.GetComponent<ModularAvatarMenuGroup>();
if (installer != null && group != null && installer.installTargetMenu == null &&
group.targetObject == null)
{
topLevelMenu = t.gameObject;
break;
}
}
}
var parentObject = topLevelMenu != null ? topLevelMenu.transform : avatar.transform;
// Avoid double registration
foreach (Transform t in parentObject.transform)
{
if (PrefabUtility.IsPartOfPrefabInstance(t) &&
PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot(t) == PATH_OUTFIT_MENU)
{
EditorGUIUtility.PingObject(t.gameObject);
return;
}
}
var instance = (GameObject) PrefabUtility.InstantiatePrefab(PREFAB_OUTFIT_MENU, parentObject);
instance.name = "Outfits";
Undo.RegisterCreatedObjectUndo(instance, "Added outfit menu");
var installerComponent = instance.GetComponent<ModularAvatarMenuInstaller>();
if (topLevelMenu != null)
{
UnityEngine.Object.DestroyImmediate(installerComponent);
PrefabUtility.RecordPrefabInstancePropertyModifications(instance);
}
EditorGUIUtility.PingObject(instance.transform.Find("BaseOutfit").gameObject);
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: ec7b467fa15c4826b90ee24441bdec83
timeCreated: 1683801782

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: a588d47980ee09a4ebc7e3b2411b2222
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,112 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1080921226743144895
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 570747844396393361}
- component: {fileID: 8592491745236883318}
- component: {fileID: 8665741192270437505}
- component: {fileID: 778752409363411128}
- component: {fileID: 1787808300107497781}
m_Layer: 0
m_Name: BaseOutfit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &570747844396393361
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080921226743144895}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3.1377757, y: -1.206413, z: -5.7641807}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8592491745236883318
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080921226743144895}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ef83cb0c23d4d7c9d41021e544a1978, type: 3}
m_Name:
m_EditorClassIdentifier:
menuToAppend: {fileID: 0}
installTargetMenu: {fileID: 11400000, guid: 2fe0aa7ecd6bc4443bade672c978f59d, type: 2}
--- !u!114 &8665741192270437505
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080921226743144895}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3b29d45007c5493d926d2cd45a489529, type: 3}
m_Name:
m_EditorClassIdentifier:
Control:
name:
icon: {fileID: 0}
type: 102
parameter:
name:
value: 1
style: 0
subMenu: {fileID: 0}
subParameters: []
labels: []
MenuSource: 0
menuSource_otherObjectChildren: {fileID: 0}
controlGroup: {fileID: 2600055823091535516, guid: e451e988456f35b49a3d011d780bda07,
type: 3}
isSynced: 1
isSaved: 1
--- !u!114 &778752409363411128
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080921226743144895}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fcac4d9412424173bd294ffd5fc5f9db, type: 3}
m_Name:
m_EditorClassIdentifier:
Objects:
- target:
referencePath:
Active: 1
--- !u!114 &1787808300107497781
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080921226743144895}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a6629f9f600742c5856a09779ca0bf12, type: 3}
m_Name:
m_EditorClassIdentifier:
isSynced: 1
isSaved: 1
defaultValue: {fileID: 8665741192270437505}
targetControlGroup: {fileID: 2600055823091535516, guid: e451e988456f35b49a3d011d780bda07,
type: 3}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b784af569c82a4845807cfe1775b4d2f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,244 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4243820046722602069
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4243820046722602068}
- component: {fileID: 6571644850945575449}
m_Layer: 0
m_Name: Outfits
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4243820046722602068
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4243820046722602069}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1697738114760012088}
m_Father: {fileID: 4243820047656436306}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6571644850945575449
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4243820046722602069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1fad1419b52a42ae89b0df52eb861e47, type: 3}
m_Name:
m_EditorClassIdentifier:
installer: {fileID: 1051166641176991665}
--- !u!1 &4243820047656436300
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4243820047656436306}
- component: {fileID: 4919827624912715597}
- component: {fileID: 6697477928590794297}
m_Layer: 0
m_Name: ClothingMenu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4243820047656436306
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4243820047656436300}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.1377757, y: -1.206413, z: -5.7641807}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1425964763638874286}
- {fileID: 4243820046722602068}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4919827624912715597
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4243820047656436300}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ef83cb0c23d4d7c9d41021e544a1978, type: 3}
m_Name:
m_EditorClassIdentifier:
menuToAppend: {fileID: 0}
installTargetMenu: {fileID: 0}
--- !u!114 &6697477928590794297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4243820047656436300}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3b29d45007c5493d926d2cd45a489529, type: 3}
m_Name:
m_EditorClassIdentifier:
Control:
name:
icon: {fileID: 0}
type: 103
parameter:
name:
value: 1
style: 0
subMenu: {fileID: 0}
subParameters: []
labels: []
MenuSource: 1
menuSource_otherObjectChildren: {fileID: 0}
controlGroup: {fileID: 0}
isSynced: 1
isSaved: 1
--- !u!1 &5753442280235042577
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1697738114760012088}
- component: {fileID: 1051166641176991665}
m_Layer: 0
m_Name: Installer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1697738114760012088
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5753442280235042577}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4243820046722602068}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1051166641176991665
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5753442280235042577}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7ef83cb0c23d4d7c9d41021e544a1978, type: 3}
m_Name:
m_EditorClassIdentifier:
menuToAppend: {fileID: 11400000, guid: 2fe0aa7ecd6bc4443bade672c978f59d, type: 2}
installTargetMenu: {fileID: 0}
--- !u!1001 &1450650863557829439
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4243820047656436306}
m_Modifications:
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalPosition.x
value: -3.1377757
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.206413
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalPosition.z
value: -5.7641807
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1080921226743144895, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
propertyPath: m_Name
value: BaseOutfit
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 8592491745236883318, guid: b784af569c82a4845807cfe1775b4d2f, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: b784af569c82a4845807cfe1775b4d2f, type: 3}
--- !u!4 &1425964763638874286 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 570747844396393361, guid: b784af569c82a4845807cfe1775b4d2f,
type: 3}
m_PrefabInstance: {fileID: 1450650863557829439}
m_PrefabAsset: {fileID: 0}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 2097228906bdff44fb40a3d9f39cf599
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,48 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3376212393282143958
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8419335417409494192}
- component: {fileID: 2600055823091535516}
m_Layer: 0
m_Name: Modular Avatar Clothing Group
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8419335417409494192
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3376212393282143958}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.1377757, y: -1.206413, z: -5.7641807}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2600055823091535516
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3376212393282143958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 99c60d83ad614e81a0488d98b83b5c1c, type: 3}
m_Name:
m_EditorClassIdentifier:
isSynced: 1
isSaved: 1
defaultValue: {fileID: 0}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e451e988456f35b49a3d011d780bda07
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,15 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -340790334, guid: 67cc4cb7839cd3741b63733d5adf0442, type: 3}
m_Name: Modular Avatar Clothing Menu Contents
m_EditorClassIdentifier:
controls: []

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2fe0aa7ecd6bc4443bade672c978f59d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: