Class Proxy
Represents a link between one real-world object and a Unity GameObject
Syntax
[ComponentTooltip("Represents a link between one real-world object and a Unity GameObject")]
[MonoBehaviourComponentMenu(typeof(Proxy), "Proxy")]
public class Proxy : MARSEntity, ISimulatable, IUsesQueryResults, IUsesMarsSceneEvaluation, IUsesDevQueryResults, IMRObject, IHasEditorColor
Fields
OnUnmatched
Called when this Proxy is manually un-matched, but not in the event of data loss leading to unmatching
Declaration
public Action<QueryMatchID, bool> OnUnmatched
Field Value
Properties
color
A color that will be associated with this object in the editor.
Declaration
public Color color { get; set; }
Property Value
Implements
colorIndex
Declaration
public int colorIndex { get; set; }
Property Value
Implements
conditions
Data filters for this Object's query
Declaration
public Conditions conditions { get; }
Property Value
currentData
The current query result data
Declaration
public QueryResult currentData { get; }
Property Value
exclusivity
Can the data captured by this Proxy be used by another Proxy?
Declaration
public Exclusivity exclusivity { get; set; }
Property Value
Priority
How important is this Proxy matching
Declaration
public MarsEntityPriority Priority { get; set; }
Property Value
queryID
The identifier for this Object's query
Declaration
public QueryMatchID queryID { get; }
Property Value
queryState
What part of the query lifecycle this Proxy is in
Declaration
public QueryState queryState { get; }
Property Value
Methods
AssignMatch(Int32, Boolean)
Declaration
public bool AssignMatch(int newDataId, bool matchConditions = true)
Parameters
Type |
Name |
Description |
Int32 |
newDataId |
|
Boolean |
matchConditions |
|
Returns
GetRequirements()
Declaration
public ProxyTraitRequirements GetRequirements()
Returns
RequestEvaluation(Action)
Request the MARS scene this proxy is in to be evaluated for matches
Declaration
public MarsSceneEvaluationRequestResponse RequestEvaluation(Action onEvaluationComplete = null)
Parameters
Type |
Name |
Description |
Action |
onEvaluationComplete |
An optional callback, executed when the evaluation process completes
|
Returns
Unmatch(Boolean)
Cause this proxy to give up its match, without removing it from the system.
If this Proxy is in a ProxyGroup, the effect depends on whether this proxy is marked as required by the group.
Un-matching a Proxy that is required by a group will result in the loss of the entire ProxyGroup's match.
Un-matching a Proxy that is in a group, but not required by it, will only lose the match for that Proxy.
Declaration
public bool Unmatch(bool searchForNewMatch = true)
Parameters
Type |
Name |
Description |
Boolean |
searchForNewMatch |
If true, the system will search for a different match automatically.
If false, the system will not search for a new match automatically.
Ignored when this Proxy is in a Group, but not required by it.
|
Returns
Type |
Description |
Boolean |
True if this proxy already had a match, and that was given up. False otherwise.
|
Extension Methods