private void AddPrefabs(RaycastHit hit) { if (!editor.IsEditorSettingsValid()) { return; } switch (gizmo.brushSettings.distribution) { case BrushSettings.Distribution.Center: AddPrefabs_Center(hit.point, hit.normal); break; case BrushSettings.Distribution.Poisson: AddPrefabs_Poisson(hit.point, hit.normal); break; case BrushSettings.Distribution.FallOff: Debug.Log("Not implemented yet: " + gizmo.brushSettings.distribution); break; case BrushSettings.Distribution.FallOff2d: Debug.Log("Not implemented yet: " + gizmo.brushSettings.distribution); break; } }
private void PerformEditorAction() { if (!editor.IsEditorSettingsValid()) { return; } if (!editorTarget.splineSettings.dirty) { return; } if (editorTarget.splineSettings.spawnMechanism == SpawnMechanism.Manual) { return; } editorTarget.splineModule.PlaceObjects(); editorTarget.splineSettings.dirty = false; // Set the editor spline dirty, so that the changed settings (e.g.control points got dragged in the scene) get updated. // Ensure the control points get saved when they are changed in the scene if we wouldn't do that, they'd only be change when something changes in the inspector EditorUtility.SetDirty(editor.target); }
private void PerformEditorAction() { if (!editor.IsEditorSettingsValid()) { return; } if (!gizmo.splineSettings.dirty) { return; } gizmo.splineModule.PlaceObjects(); gizmo.splineSettings.dirty = false; }