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