Skip to content

Commit

Permalink
Group menus together
Browse files Browse the repository at this point in the history
  • Loading branch information
Spokeek committed Sep 28, 2024
1 parent c8a8428 commit 15b7f1f
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 79 deletions.
26 changes: 21 additions & 5 deletions Packages/gogoloco/Editor/GoGoLocoMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ private void OnEnable()
*/
private void OnGUI()
{
GUILayout.BeginHorizontal();
// GoGoLoco Logo
GUILayout.Label(headerImage, GUILayout.ExpandWidth(true), GUILayout.MaxHeight(headerImage.height));
// GoGoLoco Title
GUILayout.Label("GoGoLoco", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(headerImage.height));
GUILayout.EndHorizontal();

// Help Box
GUILayout.Label("Select your avatar in the hierarchy");
Expand Down Expand Up @@ -79,27 +83,39 @@ private void OnGUI()

// Disable buttons if wrong avatar selected
GUI.enabled = errorLabel == "";

if (GUILayout.Button("Add GoGoLoco All (VRCFury) Prefab"))

GUILayout.BeginHorizontal();

GUILayout.BeginVertical();
GUILayout.Label("VRCFury Prefabs");
if (GUILayout.Button("Add GoGoLoco All"))
{
//childObject.transform.IsChildOf(parentObject.transform)
GameObject instantiatedPrefab = PrefabUtility.InstantiatePrefab(gogolocoAllVRCFuryPrefab) as GameObject;
instantiatedPrefab.transform.SetParent(avatarTarget.transform);
}
if (GUILayout.Button("Add GoGoLoco Beyond (VRCFury) Prefab"))
if (GUILayout.Button("Add GoGoLoco Beyond"))
{
GameObject instantiatedPrefab = PrefabUtility.InstantiatePrefab(gogolocoBeyondVRCFuryPrefab) as GameObject;
instantiatedPrefab.transform.SetParent(avatarTarget.transform);
}
if (GUILayout.Button("Add GoGoLoco All (Modular Avatar) Prefab"))
GUILayout.EndVertical();

GUILayout.BeginVertical();
GUILayout.Label("Modular Avatar Prefabs");
if (GUILayout.Button("Add GoGoLoco All"))
{
GameObject instantiatedPrefab = PrefabUtility.InstantiatePrefab(gogolocoAllMAPrefab) as GameObject;
instantiatedPrefab.transform.SetParent(avatarTarget.transform);
}
if (GUILayout.Button("Add GoGoLoco Beyond (Modular Avatar) Prefab"))
if (GUILayout.Button("Add GoGoLoco Beyond"))
{
GameObject instantiatedPrefab = PrefabUtility.InstantiatePrefab(gogolocoBeyondMAPrefab) as GameObject;
instantiatedPrefab.transform.SetParent(avatarTarget.transform);
}
GUILayout.EndVertical();

GUILayout.EndHorizontal();
GUI.enabled = true;
}
}
Expand Down
2 changes: 2 additions & 0 deletions ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes: []
m_configObjects:
Unity.XR.Oculus.Settings: {fileID: 11400000, guid: 8f5e5234f184e4141a7de11bffa296b7,
type: 2}
com.unity.xr.management.loader_settings: {fileID: 11400000, guid: 20a5600496b66e14587acd1b3ea804a0,
type: 2}
Loading

0 comments on commit 15b7f1f

Please sign in to comment.