The SpatialMappingObserver class encapsulates the SurfaceObserver into an easy to use object that handles managing the observed surfaces and the rendering of surface geometry.
Inheritance: SpatialMappingSource
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
 // Called when the GameObject is first created.
 private void Awake()
 {
     surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
     Source          = surfaceObserver;
 }
Esempio n. 5
0
 // Called when the GameObject is first created.
 private void Awake()
 {
     surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
     Source          = surfaceObserver;
     DontDestroyOnLoad(transform.gameObject);
 }