Skip to content

Commit

Permalink
Fixed pool editor inspector save
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptsengineer committed Oct 24, 2021
1 parent 0677638 commit a734719
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions Editor/Scripts/PoolEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public override void OnInspectorGUI()
}
EditorGUILayout.LabelField(actualObjects);
EditorGUILayout.EndHorizontal();
serializedObject.ApplyModifiedProperties();
}

public static void ShowPool()
Expand Down
13 changes: 8 additions & 5 deletions Editor/Scripts/PoolerEditor.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using UnityEngine;
using UnityEditor;
using UnityEngine;

namespace ExpressoBits.Pools.Editor
{
[CustomEditor(typeof(Pooler))]
public class PoolerEditor : UnityEditor.Editor {
public override void OnInspectorGUI() {
public class PoolerEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
}

[MenuItem("GameObject/Pool/Pooler",false,49)]
public static void CreatePooler(){
[MenuItem("GameObject/Pool/Pooler", false, 49)]
public static void CreatePooler()
{
GameObject go = new GameObject("Pooler Object");
go.AddComponent(typeof(Pooler));
}
Expand Down

0 comments on commit a734719

Please sign in to comment.