void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); }
public override void OnInspectorGUI() { //base.OnInspectorGUI(); _itemPools = (ItemPools)target; _itemPools.rarity = EditorHelper.DrawExtendedList("Rarity", _itemPools.rarity, "Category", DrawRarity); EditorGUILayout.Separator(); _itemPools.pools = EditorHelper.DrawExtendedList("Item Pools", _itemPools.pools, "Pool", DrawItemPools); if (GUI.changed) { EditorUtility.SetDirty(target); } }