artoolkit-docs

Scripts in ARToolKit for Unity

This page expounds upon the scripts referenced in the getting started guide. For lower-level usage, please see our lower level API documentation.

ARController

The ARController script manages the overall operation of the tracking plugin. It performs the necessary native plugin calls, and allows the developer to configure general settings. There should only ever be one ARController script in a scene.

ARToolKit Panel

Video Options

Threshold Options

ARMarker

The ARMarker script represents one tracked marker in the system. Add one for each individual marker that you want to track.

Marker Panel

ARTrackedObject

Represents the marker as tracked in space. Content relevant to the marker will be attached to this object.

Events

The ARTrackedObject generates the following events using Unity’s SendMessage command. To handle these events, implement the matching event handler in a script, and attach it to the ARCamera.

AROrigin

Represents the center of the ARToolKit world and is the root of the scene. Normally can be placed at {0, 0, 0}, but you may move it elsewhere, if you wish. The ARCamera and every ARTrackedObject should be children to this object. This allows for a few benefits:

ARCamera

The ARCamera script associates a camera to the AR content. Add this to a camera under the AROrigin.

Gizmos

Markers are visually represented within the Unity editor so that you can scale and position your content accordingly. Marker Gizmo