// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using UnityEditor; using UnityEngine; namespace Microsoft.MixedReality.GraphicsTools.Editor { /// /// A custom editor for the ClippingPlaneEditor to allow for specification of the framing bounds. /// [CustomEditor(typeof(ClippingPlane))] [CanEditMultipleObjects] public class ClippingPlaneEditor : ClippingPrimitiveEditor { /// protected override bool HasFrameBounds() { return true; } /// protected override Bounds OnGetFrameBounds() { var primitive = target as ClippingPlane; Debug.Assert(primitive != null); return new Bounds(primitive.transform.position, Vector3.one); } [MenuItem("GameObject/Effects/Graphics Tools/Clipping Plane")] private static void CreateClippingPlane(MenuCommand menuCommand) { InspectorUtilities.CreateGameObjectFromMenu(menuCommand); } } }