Class GeoFenceCondition
Represents a situation that depends on the user's geolocation
Inheritance
GeoFenceCondition
Inherited Members
Namespace: Unity.MARS.Conditions
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.mars@1.5/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
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 |
Returns
Type | Description |
---|---|
Single | A number from 0 to 1 indicating how well a piece of data watches this condition |
Overrides
Unity.MARS.Condition<UnityEngine.Vector2>.RateDataMatch(UnityEngine.Vector2)