public override void OnInspectorGUI() { base.OnInspectorGUI(); if (Application.isPlaying) { return; } Event e = Event.current; PrefabCollection myTarget = (PrefabCollection)target; PrefabCollectionUtility.UpdatePrefabCollection(myTarget); if (myTarget.prefabs == null || myTarget.prefabs.Count == 0) { EditorGUILayout.LabelField("Please add some prefab collections", EditorStyles.boldLabel); return; } if (e.type == EventType.ScrollWheel) { myTarget.Step(PrefabCollectionUtility.GetScrollStep(e)); } }
public void Awake() { PrefabCollectionUtility.UpdatePrefabCollection(this); }