Class GeoFenceCondition
Represents a situation that depends on the user's geolocation
Inheritance
GeoFenceCondition
Implements
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.MARS.Conditions
Assembly: Unity.MARS.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.mars@2.0/manual/ReferenceGuideConditions.html#geo-fence-condition-geofencecondition")]
[ComponentTooltip("Requires the object to be inside or outside of the specified geolocation.")]
[MonoBehaviourComponentMenu(typeof(GeoFenceCondition), "Condition/GeoFence")]
[MovedFrom("Unity.MARS")]
public class GeoFenceCondition : Condition<Vector2>, ISimulatable, ICondition<Vector2>, ICondition, IConditionBase, IRequiresTraits<Vector2>, IRequiresTraits
Properties
BoundingBox
Gets/Sets the bounding box for our geo fence.
Declaration
public GeographicBoundingBox BoundingBox { get; set; }
Property Value
Type | Description |
---|---|
GeographicBoundingBox |
Rule
Gets/Sets the bounding rule for our geo fence.
Declaration
public GeoFenceCondition.GeoFenceRule Rule { get; set; }
Property Value
Type | Description |
---|---|
GeoFenceCondition.GeoFenceRule |
Methods
GetRequiredTraits()
Get the TraitRequirements that are required by this object
Declaration
public override TraitRequirement[] GetRequiredTraits()
Returns
Type | Description |
---|---|
TraitRequirement[] | The required traits |
Overrides
OnValidate()
Declaration
public override void OnValidate()
Overrides
RateDataMatch(ref Vector2)
Describe how well a given piece of data matches a condition. 0 means the match is unacceptable, 1 means a perfect match
Declaration
public override float RateDataMatch(ref Vector2 data)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | data | The data to rate |
Returns
Type | Description |
---|---|
float | A number from 0 to 1 indicating how well a piece of data watches this condition |