Пример #1
0
	public void OnInspectorGUI()
	{
		EditorGUILayout.LabelField ("Select a pooling system");
		storePoolTypes();

		selectedType = EditorGUILayout.Popup(selectedType, poolStringTypes);

		//Check to see if a new pooling system was selected from the list
		if (GUI.changed) {
			if (!selectedType.Equals(typeStash)) {
				typeStash = selectedType;
				ScriptableObject.DestroyImmediate (pool);
			}
		}
			
		if (pool == null) {
			pool = (BasePool)ScriptableObject.CreateInstance(poolTypes[selectedType]);
		}
		pool.OnInspectorGUI ();
	}