public void NextObject() { i++; if (_db.GetModelsCount() == i) { i = 0; } _op.model = _db.GetModel(i); _op.ApplyModel(); }
public override void OnInspectorGUI() { ObjectPresenter myTarget = (ObjectPresenter)target; DrawDefaultInspector(); if (GUILayout.Button("Apply Model")) { myTarget.ApplyModel(); } if (myTarget.parts != null && myTarget.parts.Count > 0) { GUILayout.Label("Parts:"); GameObject[] gos = myTarget.parts.Keys.ToArray(); for (int i = 0; i < gos.Length; i++) { EditorGUILayout.ObjectField(gos[i], typeof(GameObject), true); } } }