Skip to content

Commit 45762af

Browse files
committed
[Editor Window] Window dimensions now use fix values for width and height
1 parent ed38935 commit 45762af

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Editor/AssetCreationMenu.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
public class AssetCreationMenu : Editor
1010
{
11-
//private const string packageRelativePath= "Assets/EspidiGames/ScriptableObjectEventSystem/";
12-
private const string packageRelativePath= "Packages/com.espidigames.scriptable-object-event-system/";
11+
//private const string packageRelativePath = "Assets/EspidiGames/ScriptableObjectEventSystem/";// Use this to test functionality if developing new features
12+
private const string packageRelativePath = "Packages/com.espidigames.scriptable-object-event-system/"; //Release path to work from packages directory
1313

1414
private const string eventIconRelativepath = "/Icons/event.png";
1515
private const string eventListenerIconRelativePath = "/Icons/listener.png";

Editor/ScriptableObjectEventCreationWindow.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public static void OpenWindow()
3131
ScriptableObjectEventCreationWindow window =
3232
EditorWindow.GetWindow<ScriptableObjectEventCreationWindow>(true, "Select Randomized Selected Objects");
3333

34+
Vector2 windowDimensions = new Vector2(300, 400);
35+
window.minSize = windowDimensions;
36+
window.maxSize = windowDimensions;
37+
3438
window.argsToggle[(int)ToggleIndices.NoArgs] = true;
3539
window.argsToggle_prev[(int)ToggleIndices.NoArgs] = true;
3640
window.currentActiveToggle = ToggleIndices.NoArgs;
@@ -52,7 +56,7 @@ public IEnumerator MakeWindowModal()
5256

5357
void OnGUI()
5458
{
55-
useTypeAsName = EditorGUILayout.ToggleLeft("Use Type as name", useTypeAsName);
59+
useTypeAsName = EditorGUILayout.ToggleLeft("Use argument Type as name", useTypeAsName);
5660
if (argsToggle[(int)ToggleIndices.Custom])
5761
{
5862
EditorGUILayout.HelpBox($"Custom type is selected. It is recommended to add a custom name manually.", MessageType.Warning);
@@ -92,7 +96,9 @@ void OnGUI()
9296
EditorGUILayout.HelpBox($"Help box \n{eventSOname}.cs\n{eventListenername}.cs", MessageType.None);
9397

9498
//Creation button:
95-
EditorGUILayout.Space(20);
99+
//EditorGUILayout.Space(20);
100+
GUILayout.FlexibleSpace();
101+
96102

97103
if (GUILayout.Button("Create SO event scripts"))
98104
{

0 commit comments

Comments
 (0)