コード例 #1
0
        /// <inheritdoc />
        protected BaseMixedRealitySpatialObserverDataProvider(string name, uint priority, BaseMixedRealitySpatialObserverProfile profile, IMixedRealitySpatialAwarenessSystem parentService)
            : base(name, priority, profile, parentService)
        {
            if (profile.IsNull())
            {
                profile = MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessProfile.GlobalMeshObserverProfile;
            }

            if (profile.IsNull())
            {
                throw new ArgumentNullException($"Missing a {profile.GetType().Name} profile for {name}");
            }

            SourceId        = MixedRealityToolkit.SpatialAwarenessSystem.GenerateNewObserverId();
            StartupBehavior = profile.StartupBehavior;
            UpdateInterval  = profile.UpdateInterval;
            PhysicsLayer    = profile.PhysicsLayer;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="priority"></param>
        /// <param name="profile"></param>
        protected BaseMixedRealitySpatialObserverDataProvider(string name, uint priority, BaseMixedRealitySpatialObserverProfile profile)
            : base(name, priority)
        {
            if (profile == null)
            {
                throw new ArgumentNullException($"Missing profile for {name}");
            }

            SourceId        = MixedRealityToolkit.SpatialAwarenessSystem.GenerateNewObserverId();
            StartupBehavior = profile.StartupBehavior;
            UpdateInterval  = profile.UpdateInterval;
            PhysicsLayer    = profile.PhysicsLayer;
        }