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
Exemplo 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;
            }
        }
Exemplo 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;
            }
        }
Exemplo n.º 4
0
 // Called when the GameObject is first created.
 private void Awake()
 {
     surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
     Source          = surfaceObserver;
 }
Exemplo n.º 5
0
 // Called when the GameObject is first created.
 private void Awake()
 {
     surfaceObserver = gameObject.GetComponent <SpatialMappingObserver>();
     Source          = surfaceObserver;
     DontDestroyOnLoad(transform.gameObject);
 }