The SpatialMappingObserver class encapsulates the SurfaceObserver into an easy to use object that handles managing the observed surfaces and the rendering of surface geometry.
Наследование: SpatialMappingSource
Пример #1
0
        // Called when the GameObject is first created.
        protected override void Awake()
        {
            base.Awake();

            surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
            Source          = surfaceObserver;
        }
        // Functions
        private void Start()
        {
            // Register for change events on the mapping manager
            SpatialMappingObserver mappingObserver = SpatialMappingManager.Instance.Source as SpatialMappingObserver;

            if (mappingObserver != null)
            {
                mappingObserver.SurfaceChanged += OnSurfaceChanged;
            }
        }
Пример #3
0
        // Functions
        private void Start()
        {
            // Register for change events on the mapping Service
            SpatialMappingObserver mappingObserver = SpatialMappingManager.Instance.Source as SpatialMappingObserver;

            if (mappingObserver != null)
            {
                mappingObserver.DataReady      += MappingObserver_DataReady;
                mappingObserver.SurfaceChanged += MappingObserver_SurfaceChanged;
            }
        }
Пример #4
0
 // Called when the GameObject is first created.
 private void Awake()
 {
     surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
     Source          = surfaceObserver;
 }
Пример #5
0
 // Called when the GameObject is first created.
 private void Awake()
 {
     surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
     Source          = surfaceObserver;
     DontDestroyOnLoad(transform.gameObject);
 }