Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MA Information の表示される GameObject を制限する #817

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions Editor/HarmonyPatches/InjectParamsUsageUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,16 @@ private static void EditorAdd(VisualElement container, VisualElement child, obje

if (editor.targets.Length != 1) return;

if (editor.target is GameObject obj)
{
var elem = new ParamsUsageUI();
container.Add(elem);
}
if (editor.target is not GameObject obj) return;

Component defComponent = obj.GetComponent<AvatarTagComponent>();
#if MA_VRCSDK3_AVATARS
if (defComponent == null) defComponent = obj.GetComponent<VRC.SDK3.Avatars.Components.VRCAvatarDescriptor>();
#endif
if (defComponent == null) return;

var elem = new ParamsUsageUI();
container.Add(elem);
}
}
}
}