C API Unity API
Unity API Reference (Version 10.14.4)
ImageTargetBehaviour Class Reference

This class serves both as an augmentation definition for an ImageTarget in the editor as well as a tracked image target result at runtime More...

Inheritance diagram for ImageTargetBehaviour:
ScalableDataSetTrackableBehaviour DataSetTrackableBehaviour ObserverBehaviour VuforiaMonoBehaviour

Public Member Functions

VirtualButtonBehaviour CreateVirtualButton (string vbName, Vector2 position, Vector2 size)
 This method creates a Virtual Button and adds it to this Image Target as a direct child. More...
 
void DestroyVirtualButton (string vbName)
 Destroys the virtual button with the given name. More...
 
Texture2D GetRuntimeTargetTexture ()
 Returns the texture that is assigned to this target during the authoring in the editor. More...
 
Vector2 GetSize ()
 Returns the size of this target in scene units More...
 
TrackingOptimization GetTrackingOptimization ()
 Get the tracking optimization More...
 
IEnumerable< VirtualButtonBehaviourGetVirtualButtonBehaviours ()
 Returns the virtual button behaviours for this imageTargetBehaviour. More...
 
void SetHeight (float height)
 Set the height (y-dimension) of the target in scene units. This will scale the target uniformly. The dataset of this target has to be deactivated before setting the size. More...
 
bool SetTrackingOptimization (TrackingOptimization optimization)
 Set the tracking optimization More...
 
void SetWidth (float width)
 Set the width (x-dimension) of the target in scene units. This will scale the target uniformly. The dataset of this target has to be deactivated before setting the size. More...
 

Static Public Member Functions

static VirtualButtonBehaviour CreateVirtualButton (string vbName, Vector2 localScale, GameObject immediateParent)
 This methods adds the Virtual Button as a child of "immediateParent". Returns null if "immediateParent" is not an Image Target or a child of an Image Target. More...
 

Properties

ImageTargetType ImageTargetType [get, set]
 Type of image target: can be a user created target or a static one from a dataset or cloud reco More...
 
- Properties inherited from ObserverBehaviour
TargetStatus TargetStatus [get]
 Current status information of the target More...
 

Additional Inherited Members

- Public Attributes inherited from ObserverBehaviour
int ID => mObserver?.Id
 The runtime Id of the Observer More...
 
string TargetName => mTrackableName
 Name of the target of the Observer More...
 
- Events inherited from ObserverBehaviour
Action< ObserverBehaviourOnBehaviourDestroyed
 Triggered when this behaviour is destroyed. Can be used for script cleanup More...
 
Action< ObserverBehaviour, TargetStatusOnTargetStatusChanged
 Triggered when the TargetStatus changes More...
 

Detailed Description

This class serves both as an augmentation definition for an ImageTarget in the editor as well as a tracked image target result at runtime

Member Function Documentation

◆ CreateVirtualButton() [1/2]

VirtualButtonBehaviour CreateVirtualButton ( string  vbName,
Vector2  position,
Vector2  size 
)
inline

This method creates a Virtual Button and adds it to this Image Target as a direct child.

Parameters
vbNameName of the Virtual Button
positionPosition relative to the Image Target's Transform
sizeSize relative to the Image Target's Transform

◆ CreateVirtualButton() [2/2]

static VirtualButtonBehaviour CreateVirtualButton ( string  vbName,
Vector2  localScale,
GameObject  immediateParent 
)
inlinestatic

This methods adds the Virtual Button as a child of "immediateParent". Returns null if "immediateParent" is not an Image Target or a child of an Image Target.

◆ DestroyVirtualButton()

void DestroyVirtualButton ( string  vbName)
inline

Destroys the virtual button with the given name.

◆ GetRuntimeTargetTexture()

Texture2D GetRuntimeTargetTexture ( )
inline

Returns the texture that is assigned to this target during the authoring in the editor.

◆ GetSize()

Vector2 GetSize ( )
inline

Returns the size of this target in scene units

◆ GetTrackingOptimization()

TrackingOptimization GetTrackingOptimization ( )
inline

Get the tracking optimization

◆ GetVirtualButtonBehaviours()

IEnumerable<VirtualButtonBehaviour> GetVirtualButtonBehaviours ( )
inline

Returns the virtual button behaviours for this imageTargetBehaviour.

◆ SetHeight()

void SetHeight ( float  height)
inline

Set the height (y-dimension) of the target in scene units. This will scale the target uniformly. The dataset of this target has to be deactivated before setting the size.

◆ SetTrackingOptimization()

bool SetTrackingOptimization ( TrackingOptimization  optimization)
inline

Set the tracking optimization

◆ SetWidth()

void SetWidth ( float  width)
inline

Set the width (x-dimension) of the target in scene units. This will scale the target uniformly. The dataset of this target has to be deactivated before setting the size.

Property Documentation

◆ ImageTargetType

Type of image target: can be a user created target or a static one from a dataset or cloud reco