ARGeospatialCreatorAnchor

A representation of a Geospatial Anchor that was created using the Geospatial Creator tool.

This object is responsible for creating a proper ARGeospatialAnchor at runtime at the latitude, longitude, and altitude specified.

Summary

Inheritance

Inherits from: ARGeospatialCreatorObject

Properties

Altitude
double
Gets or sets the altitude.
AltitudeType
Gets or sets the AnchorAltitudeType used for resolution of this anchor.
AnchorManager
Gets and sets the ARAnchorManager used for resolving this anchor at runtime.
EditorAltitudeOverride
double
Gets and sets the altitude (in WGS84 meters) at which the Anchor should be rendered in the Editor's scene view.
Latitude
double
Gets or sets the latitude of this anchor.
Longitude
double
Gets or sets the longitude of this anchor.
UseEditorAltitudeOverride
bool
Indicates if the anchor should be rendered in the Editor's Scene view at the default ARGeospatialCreatorAnchor.Altitude, or at the altitude specified by EditorAltitudeOverride.

Public attributes

Origin
Gets or sets the Geospatial Creator Origin used to resolve the location of this anchor.

Properties

Altitude

double Altitude

Gets or sets the altitude.

When AltitudeType is AltitudeType.WGS84, this value is the altitude of the anchor, in meters according to WGS84.

When AltitudeType is AltitudeType.Terrain or AltitudeType.Rooftop, this value is ONLY used in Editor mode, to determine the altitude at which to render the anchor in the Editor's Scene View, and it is ignored in the Player.

AltitudeType

AnchorAltitudeType AltitudeType

Gets or sets the AnchorAltitudeType used for resolution of this anchor.

AnchorManager

ARAnchorManager AnchorManager

Gets and sets the ARAnchorManager used for resolving this anchor at runtime.

The property is read-only at runtime.

If null, this property will be given a default value during the Awake() message execution, as follows:

  • If the ARSessionOrigin has an AnchorManager subcomponent, that ARAnchorManager will be used;
  • otherwise the first active and enabled ARAnchorManager object returned by Resources.FindObjectsOfTypeAll() will be used.
  • If there are no active and enabled ARAnchorManager components in the scene, the first inactive / disabled ARAnchorManager is used.
  • If there are no ARAnchorManager objects in the scene, an error will be logged and this property will remain null.
ARGeospatialCreatorAnchor objects will not be resolved at runtime if the property remains null.

EditorAltitudeOverride

double EditorAltitudeOverride

Gets and sets the altitude (in WGS84 meters) at which the Anchor should be rendered in the Editor's scene view.

This value is ignored when UseEditorAltitudeOverride is false.

EditorAltitudeOverride is useful if the default altitude rooftop or terrain anchor is inaccurate, or if using WGS84 altitude and the scene geometry does not line up exactly with the real world. EditorAltitudeOverride is not used at runtime. Note that for rooftop and terrain anchors, the relative altitude ARGeospatialCreatorAnchor.Altitude will still offset the anchor height in the Editor scene view when this field is in use.

Latitude

double Latitude

Gets or sets the latitude of this anchor.

Longitude

double Longitude

Gets or sets the longitude of this anchor.

UseEditorAltitudeOverride

bool UseEditorAltitudeOverride

Indicates if the anchor should be rendered in the Editor's Scene view at the default ARGeospatialCreatorAnchor.Altitude, or at the altitude specified by EditorAltitudeOverride.

If false, EditorAltitudeOverride is ignored. UseEditorAltitudeOverride is not available at runtime.

Public attributes

Origin

ARGeospatialCreatorOrigin Origin

Gets or sets the Geospatial Creator Origin used to resolve the location of this anchor.

This property only exists in Editor mode.

This property will be given a default value in the Editor's Awake() message execution, as follows:

  • If there are no objects of type ARGeospatialCreatorOrigin in the scene, it will remain null and a warning will be logged.
  • If there is exactly one object of type ARGeospatialCreatorOrigin in the scene, that origin will be assigned to this property.
  • If more than one object of type ARGeospatialCreatorOrigin are in the scene, a warning is logged and the property will remain null. A default origin in the scene will be used to resolve the Anchor's location.