internal static void RemoveUnsupportedComponents() { var obj = Selection.activeGameObject; Undo.SetCurrentGroupName("Remove Unsupported Components"); VRCSDKUtils.RemoveUnsupportedComponentsInChildren(obj, true, true); }
internal static void RemoveMissingComponents() { var obj = Selection.activeGameObject; var count = VRCSDKUtils.CountMissingComponentsInChildren(obj, true); Debug.Log($"[VRCQuestTools] {obj.name} has {count} missing scripts in children"); if (count == 0) { return; } if (PrefabUtility.IsPartOfPrefabInstance(obj)) { Undo.SetCurrentGroupName("Remove Missing Components"); // Somehow unpacking is needed to apply changes to the scene file. PrefabUtility.UnpackPrefabInstance(obj, PrefabUnpackMode.OutermostRoot, InteractionMode.UserAction); Debug.Log($"[VRCQuestTools] {obj.name} has been unpacked"); } VRCSDKUtils.RemoveMissingComponentsInChildren(obj, true); }
static bool ValidateAvatarMenu() { var obj = Selection.activeGameObject; return(VRCSDKUtils.IsAvatar(obj)); }