// ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ public void UpdateClipList() { exPlane[] planes = contentAnchor.GetComponentsInChildren <exPlane>(); foreach (exPlane plane in planes) { if (plane as exUIElement == false) { clipRect.AddPlane(plane); } } }
// ------------------------------------------------------------------ /// \param _clipping the clipping plane /// \param _plane the plane to add to clip /// add plane to clipping list // ------------------------------------------------------------------ public static void AddPlaneInEditor(this exClipping _clipping, exPlane _plane) { _clipping.AddPlane(_plane); exClipping clipPlane = _plane as exClipping; // if this is not a clip plane if (clipPlane == null) { ApplyClipMaterialInEditor(_clipping, _plane); } }
// ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ IEnumerator Start() { foreach (exPlane plane in planes) { clipPlane.AddPlane(plane); } yield return(new WaitForSeconds(2.0f)); foreach (exPlane plane in planes) { clipPlane.RemovePlane(plane); } yield return(new WaitForSeconds(2.0f)); foreach (exPlane plane in planes) { clipPlane.AddPlane(plane); } }