public override void OnPostTargetMembersGUI() { if (NumTargets != 1) { return; } using (new GUI.EnabledBlock(!EditorApplication.isPlayingOrWillChangePlaymode)) { Undo.RecordObject(Sink, "Sink template"); var sinkAll = InspectorGUI.Toggle(GUI.MakeLabel("Sink All"), Sink.SinkAll); if (sinkAll != Sink.SinkAll) { Sink.SinkAll = sinkAll; } if (!Sink.SinkAll) { InspectorGUI.ToolListGUI(this, Sink.Templates, "Sink Templates", m_availableTemplates, OnTemplateAdd, OnTemplateRemove); } } }
public override void OnPreTargetMembersGUI() { Manager.RemoveNullEntries(); InspectorGUI.ToolListGUI(this, Manager.ContactMaterials, Identifier, cm => Manager.Add(cm), cm => Manager.Remove(cm), PreContactMaterialEditor(Manager.ContactMaterialEntries)); }
public override void OnPostTargetMembersGUI() { if (NumTargets > 1) { return; } Undo.RecordObject(Track, "Track wheel add/remove."); InspectorGUI.ToolListGUI(this, Track.Wheels, "Wheels", wheel => Track.Add(wheel), wheel => Track.Remove(wheel)); }
public override void OnPostTargetMembersGUI() { if (NumTargets != 1) { return; } Undo.RecordObject(Emitter, "Emitter template"); InspectorGUI.ToolListGUI(this, Emitter.Templates, "Templates", OnAddTemplate, OnRemoveTemplate, OnRenderProbabilityWeight, null, m_availableTemplates); }
public override void OnPostTargetMembersGUI() { if (NumTargets > 1) { return; } InspectorGUI.ToolListGUI(this, Belt.Rollers, "Rollers", wheel => Belt.Add(wheel), wheel => Belt.Remove(wheel), OnRollerGUI); using (new GUI.EnabledBlock(false)) InspectorGUI.ToolArrayGUI(this, Belt.Tracks, "Tracks"); }
public override void OnPostTargetMembersGUI() { //var patchTerrainData = GUILayout.Button( GUI.MakeLabel( "Patch terrain data" ), InspectorEditor.Skin.Button ); //if ( patchTerrainData ) { // foreach ( var terrain in GetTargets<DeformableTerrain>() ) // terrain.PatchTerrainData(); //} if (NumTargets > 1) { return; } Undo.RecordObject(DeformableTerrain, "Shovel add/remove."); InspectorGUI.ToolListGUI(this, DeformableTerrain.Shovels, "Shovels", shovel => DeformableTerrain.Add(shovel), shovel => DeformableTerrain.Remove(shovel)); }