Ejemplo n.º 1
0
        /// <inheritdoc/>
        public override void Initialize()
        {
            if (!Application.isPlaying)
            {
                return;
            }

            boundaryEventData = new BoundaryEventData(EventSystem.current);

            Scale          = MixedRealityToolkit.Instance.ActiveProfile.TargetExperienceScale;
            BoundaryHeight = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.BoundaryHeight;

            SetTrackingSpace();
            CalculateBoundaryBounds();
            Boundary.visible = true;

            ShowFloor                 = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowFloor;
            FloorPhysicsLayer         = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.FloorPhysicsLayer;
            ShowPlayArea              = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowPlayArea;
            PlayAreaPhysicsLayer      = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.PlayAreaPhysicsLayer;
            ShowTrackedArea           = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowTrackedArea;
            TrackedAreaPhysicsLayer   = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.TrackedAreaPhysicsLayer;
            ShowBoundaryWalls         = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowBoundaryWalls;
            BoundaryWallsPhysicsLayer = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.BoundaryWallsPhysicsLayer;
            ShowBoundaryCeiling       = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowBoundaryCeiling;
            CeilingPhysicsLayer       = MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile.CeilingPhysicsLayer;

            if (ShowFloor)
            {
                GetFloorVisualization();
            }
            if (ShowPlayArea)
            {
                GetPlayAreaVisualization();
            }
            if (ShowTrackedArea)
            {
                GetTrackedAreaVisualization();
            }
            if (ShowBoundaryWalls)
            {
                GetBoundaryWallVisualization();
            }
            if (ShowBoundaryWalls)
            {
                GetBoundaryCeilingVisualization();
            }

            RaiseBoundaryVisualizationChanged();
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public override void Initialize()
        {
            base.Initialize();

            if (!Application.isPlaying)
            {
                return;
            }

            boundaryEventData = new BoundaryEventData(EventSystem.current);

            CalculateBoundaryBounds();
            Boundary.visible = true;

            if (ShowFloor)
            {
                GetFloorVisualization();
            }

            if (ShowPlayArea)
            {
                GetPlayAreaVisualization();
            }

            if (ShowTrackedArea)
            {
                GetTrackedAreaVisualization();
            }

            if (ShowBoundaryWalls)
            {
                GetBoundaryWallVisualization();
            }

            if (ShowBoundaryWalls)
            {
                GetBoundaryCeilingVisualization();
            }

            RaiseBoundaryVisualizationChanged();
        }
        /// <summary>
        /// Performs initialization tasks for the BoundaryManager.
        /// </summary>
        private void InitializeInternal()
        {
            boundaryEventData = new BoundaryEventData(EventSystem.current);

            Scale          = MixedRealityManager.Instance.ActiveProfile.TargetExperienceScale;
            BoundaryHeight = MixedRealityManager.Instance.ActiveProfile.BoundaryHeight;

            SetTrackingSpace();
            CalculateBoundaryBounds();
            Boundary.visible = true;

            ShowFloor           = MixedRealityManager.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowFloor;
            ShowPlayArea        = MixedRealityManager.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowPlayArea;
            ShowTrackedArea     = MixedRealityManager.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowTrackedArea;
            ShowBoundaryWalls   = MixedRealityManager.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowBoundaryWalls;
            ShowBoundaryCeiling = MixedRealityManager.Instance.ActiveProfile.BoundaryVisualizationProfile.ShowBoundaryCeiling;

            if (ShowFloor)
            {
                GetFloorVisualization();
            }
            if (ShowPlayArea)
            {
                GetPlayAreaVisualization();
            }
            if (ShowTrackedArea)
            {
                GetTrackedAreaVisualization();
            }
            if (ShowBoundaryWalls)
            {
                GetBoundaryWallVisualization();
            }
            if (ShowBoundaryWalls)
            {
                GetBoundaryCeilingVisualization();
            }

            RaiseBoundaryVisualizationChanged();
        }
Ejemplo n.º 4
0
 /// <inheritdoc />
 public void OnBoundaryVisualizationChanged(BoundaryEventData eventData)
 {
     Debug.Log("[BoundaryVisualizationDemo] Boundary visualization changed.");
 }