Modifying Conditions
// Below is an example of modifying the distance requirement
// on a DistanceCondition. This line of code can be called from
// any NetworkBehaviour. You may also use nbReference.NetworkObserver...
base.NetworkObserver.GetObserverCondition<DistanceCondition>().MaximumDistance = 10f;// The OwnerOnlyCondition is returned and disabled.
// This allows all players to see the object, rather than just the owner.
ObserverCondition c = base.NetworkObject.NetworkObserver.GetObserverCondition<OwnerOnlyCondition>();
c.SetIsEnabled(false);
// Even though we are returning ObserverCondition type, it could be casted to
// OwnerOnlyCondition.Last updated