Skip to content

Commit

Permalink
2.3.8 - Release
Browse files Browse the repository at this point in the history
- Added Right-click menu to Hierarchy.
- Added 2019 backcompat-support.
- vArIoUs OtHeR cHaNgEs
  • Loading branch information
JustBuddy committed May 25, 2024
1 parent 047b824 commit 1e0ceca
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 22 deletions.
67 changes: 46 additions & 21 deletions Editor/PosesExtensionImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,116 @@
using UnityEditor;

namespace BUDDYWORKS.PosesExtension
{
public class PEPrefabSpawner : MonoBehaviour
{
public class PrefabSpawner : MonoBehaviour
{
// VRCF Prefab definitions
public static string prefabPE_Standalone_VRCF = "ff714a403f2fe944aa77358222a4be1c";
public static string prefabPE_GGL_VRCF = "09cb0fd5fac430446b22b023b90bd66d";
public static string VRCF_Path = "Packages/com.vrcfury.vrcfury";
#if UNITY_2022_3_OR_NEWER
static string prefabPE_Standalone_VRCF = "ff714a403f2fe944aa77358222a4be1c";
static string prefabPE_GGL_VRCF = "09cb0fd5fac430446b22b023b90bd66d";
#else
static string prefabPE_Standalone2019_VRCF = "c935052f7e5696b418d71df05cae7163";
static string prefabPE_GGL2019_VRCF = "208c3816e6a08c744bd98bcde7d8f09e";
#endif
static string VRCF_Path = "Packages/com.vrcfury.vrcfury";

// MA Prefab definitions
public static string prefabPE_Standalone_MA = "095b224818f91be42a97b83442ee50de";
static string prefabPE_Standalone_MA = "095b224818f91be42a97b83442ee50de";
// public static string prefabPE_GGL_MA = "09cb0fd5fac430446b22b023b90bd66d";
public static string MA_Path = "Packages/nadena.dev.modular-avatar";
static string MA_Path = "Packages/nadena.dev.modular-avatar";

// GGL Prefab definitions
public static string prefabGGL_Beyond = "10b55c87769faa544ae55a6de658bf86";
public static string prefabGGL_All = "d1e19656881f0994b880e2ea7164e6bf";
static string prefabGGL_Beyond = "10b55c87769faa544ae55a6de658bf86";
static string prefabGGL_All = "d1e19656881f0994b880e2ea7164e6bf";

// Toolbar Menu
[MenuItem("BUDDYWORKS/Poses Extension/Spawn Standalone Prefab... [VRCFury] [Recommended]", false, 0)]
public static void SpawnPE()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn Standalone Prefab... [VRCFury] [Recommended]", false, 0)]
private static void SpawnPE()
{
#if UNITY_2022_3_OR_NEWER
SpawnPrefab(prefabPE_Standalone_VRCF);
#else
SpawnPrefab(prefabPE_Standalone2019_VRCF);
#endif
NotifyOrder();
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn GGL-Variant Prefab... [VRCFury] [Lite]", false, 1)]
public static void SpawnPEGGL()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn GGL-Variant Prefab... [VRCFury] [Lite]", false, 1)]
private static void SpawnPEGGL()
{
#if UNITY_2022_3_OR_NEWER
SpawnPrefab(prefabPE_GGL_VRCF);
#else
SpawnPrefab(prefabPE_GGL2019_VRCF);
#endif
NotifyOrder();
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn Prefab... [ModularAvatar] (Experimental)", false, 20)]
public static void SpawnPE_MA()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn Prefab... [ModularAvatar] (Experimental)", false, 2)]
private static void SpawnPE_MA()
{
SpawnPrefab(prefabPE_Standalone_MA);
NotifyOrder();
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn GoGo Loco Beyond Prefab...", false, 60)]
public static void SpawnGGLBeyond()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn GoGo Loco Beyond Prefab...", false, 5)]
private static void SpawnGGLBeyond()
{
SpawnPrefab(prefabGGL_Beyond);
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn GoGo Loco All Prefab...", false, 70)]
public static void SpawnGGLAll()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn GoGo Loco All Prefab...", false, 6)]
private static void SpawnGGLAll()
{
SpawnPrefab(prefabGGL_All);
}

[MenuItem("BUDDYWORKS/Poses Extension/Prefab must go after Locomotion in Hierarchy!", false, 1000)]
public static void DISCLAIMER()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Prefab must go after Locomotion in Hierarchy!", false, 1000)]
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/---------------", false, 4)]
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/----------------", false, 7)]
private static void DISCLAIMER()
{
NotifyOrder();
}

// Enable or disable menu items dynamically

[MenuItem("BUDDYWORKS/Poses Extension/Spawn Standalone Prefab... [VRCFury] [Recommended]", true)]
public static bool ValidateSpawnPE()
private static bool ValidateSpawnPE()
{
return AssetDatabase.IsValidFolder(VRCF_Path) != false;
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn GGL-Variant Prefab... [VRCFury] [Lite]", true)]
public static bool ValidateSpawnPEGGL()
private static bool ValidateSpawnPEGGL()
{
return AssetDatabase.IsValidFolder(VRCF_Path) != false;
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn Prefab... [ModularAvatar] (Experimental)", true)]
public static bool ValidateSpawnPE_MA()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn Prefab... [ModularAvatar] (Experimental)", true)]
private static bool ValidateSpawnPE_MA()
{
return AssetDatabase.IsValidFolder(MA_Path) != false;
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn GoGo Loco Beyond Prefab...", true)]
public static bool ValidateSpawnGGLBeyond()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn GoGo Loco Beyond Prefab...", true)]
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/---------------", true)]
private static bool ValidateSpawnGGLBeyond()
{
return AssetDatabase.LoadAssetAtPath<GameObject>(AssetDatabase.GUIDToAssetPath(prefabGGL_Beyond)) != null;
}

[MenuItem("BUDDYWORKS/Poses Extension/Spawn GoGo Loco All Prefab...", true)]
public static bool ValidateSpawnGGLAll()
[MenuItem("GameObject/BUDDYWORKS/Poses Extension/Spawn GoGo Loco All Prefab...", true)]
private static bool ValidateSpawnGGLAll()
{
return AssetDatabase.LoadAssetAtPath<GameObject>(AssetDatabase.GUIDToAssetPath(prefabGGL_All)) != null;
}
Expand Down Expand Up @@ -135,4 +160,4 @@ private static void SpawnPrefab(string guid)
}
}
}
}
}
8 changes: 8 additions & 0 deletions Pose Extension/Data/Variants/2019 Backcompat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3426338969786939213
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3426338969786939215}
- component: {fileID: 3426338969786939214}
m_Layer: 0
m_Name: BUDDYWORKS Poses Extension [VRCF] (GGL Variant) [2019]
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3426338969786939215
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3426338969786939213}
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: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3426338969786939214
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3426338969786939213}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d9e94e501a2d4c95bff3d5601013d923, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 3
unityVersion: 2019.4.31f1
vrcfuryVersion: 1.906.0
somethingIsBroken: 0
config:
features: []
content:
id: 0
references:
version: 1
00000000:
type: {class: FullController, ns: VF.Model.Feature, asm: VRCFury}
data:
version: 4
controllers:
- controller:
version: 1
fileID: 0
guid:
id: 55b7d88510726684eae850eaab5274f2|Packages/wtf.buddyworks.posesextension/Pose
Extension/Data/Variants/GoGo Loco Variant/Poses Extension - Action
(GGL Variant).controller
objRef: {fileID: 9100000, guid: 55b7d88510726684eae850eaab5274f2, type: 2}
type: 4
menus:
- menu:
version: 1
fileID: 0
guid:
id: c1d1ceecc58c64441a69ee7d84050563|Packages/wtf.buddyworks.posesextension/Pose
Extension/Data/Variants/GoGo Loco Variant/Poses Extension - Root Menu
(GGL Variant).asset
objRef: {fileID: 11400000, guid: c1d1ceecc58c64441a69ee7d84050563, type: 2}
prefix:
prms:
- parameters:
version: 1
fileID: 0
guid:
id: 2fbf80741256c0048b04595b6907d40c|Packages/wtf.buddyworks.posesextension/Pose
Extension/Data/Variants/GoGo Loco Variant/Poses Extension - Parameters
(GGL Variant).asset
objRef: {fileID: 11400000, guid: 2fbf80741256c0048b04595b6907d40c, type: 2}
smoothedPrms: []
globalParams:
- Go/Float
- Go/VRCEmote
allNonsyncedAreGlobal: 0
ignoreSaved: 0
toggleParam:
rootObjOverride: {fileID: 0}
rootBindingsApplyToAvatar: 0
rewriteBindings: []
allowMissingAssets: 0
controller:
version: 1
fileID: 0
guid:
id:
objRef: {fileID: 0}
menu:
version: 1
fileID: 0
guid:
id:
objRef: {fileID: 0}
parameters:
version: 1
fileID: 0
guid:
id:
objRef: {fileID: 0}
submenu:
removePrefixes: []
addPrefix:
useSecurityForToggle: 0

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1e0ceca

Please sign in to comment.