All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Modules Pages
Loading...
Searching...
No Matches
VuforiaRuntimeUtilities Class Reference

A utility class containing various helper methods. More...

Static Public Member Functions

static Vector2 ConvertImageToScreenSpace (Vector2 imagePosition)
 Converts coordinates from image space to screen space.
 
static Vector2 ConvertScreenToImageSpace (Vector2 screenPosition)
 Converts coordinates from screen space to image space.
 
static FusionProviderType GetActiveFusionProvider ()
 Returns which provider Vuforia Fusion has selected to use.
 
static IEnumerable< T > GetComponentsInChildrenExcluding< T, U > (GameObject gameObject)
 Recursively traverses the gameObjects hierarchy to find components of type T. Traversal wil stop at gameObjects that contain components of type U.
 
static string GetFullDataSetPath (string dataSetPath)
 Sanitizes streaming assets path for all platforms.
 
static string GetStoragePath (string path)
 Returns the correct path based on the current platform.
 
static bool IsPlayMode ()
 returns ONLY true if we are running in Play Mode
 
static bool IsRecordingPlayMode ()
 returns true if we are running in Play Mode with a Recording
 
static bool IsSimulatorPlayMode ()
 returns ONLY true if we are running in Play Mode in Simulator Mode
 
static bool IsUsingBuiltInRenderPipeline ()
 
static bool IsVuforiaEnabled ()
 returns true if we have access to Vuforia (on a mobile device OR in the emulator in Unity Pro with a webcam connected)
 
static bool IsWebCamPlayMode ()
 returns true if we are running in Play Mode with a WebCam
 
static bool IsWebCamUsed ()
 If the web cam is enabled.
 
static bool IsWSARuntime ()
 returns true ONLY if we are in any one of the WSA modes
 
static string StripStreamingAssetsFromPath (string fullPath)
 Returns the file path without the first two elements of the path for example it would remove '*‍/StreamingAssets'.
 

Properties

static ScreenOrientation ScreenOrientation [get]
 Returns the current screen orientation. In the Editor, the orientation is always LandscapLeft.
 

Detailed Description

A utility class containing various helper methods.

Member Function Documentation

◆ ConvertImageToScreenSpace()

static Vector2 ConvertImageToScreenSpace ( Vector2 imagePosition)
inlinestatic

Converts coordinates from image space to screen space.

Parameters
imagePositionPosition in image space coordinates.
Returns
Position in screen space coordinates.

◆ ConvertScreenToImageSpace()

static Vector2 ConvertScreenToImageSpace ( Vector2 screenPosition)
inlinestatic

Converts coordinates from screen space to image space.

Parameters
screenPositionPosition in screen space coordinates.
Returns
Position in image space coordinates.

◆ GetActiveFusionProvider()

static FusionProviderType GetActiveFusionProvider ( )
inlinestatic

Returns which provider Vuforia Fusion has selected to use.

This function must be called after initializing Vuforia. If called before initializing Vuforia Engine, the function returns UNKNOWN.

◆ GetComponentsInChildrenExcluding< T, U >()

static IEnumerable< T > GetComponentsInChildrenExcluding< T, U > ( GameObject gameObject)
inlinestatic

Recursively traverses the gameObjects hierarchy to find components of type T. Traversal wil stop at gameObjects that contain components of type U.

Parameters
gameObjectThe game object
Template Parameters
TThe component type to look for
UThe component type where to stop traversal
Returns
Enumeration of all found instances of T
Type Constraints
T :Component 
U :Component 

◆ GetFullDataSetPath()

static string GetFullDataSetPath ( string dataSetPath)
inlinestatic

Sanitizes streaming assets path for all platforms.

Parameters
dataSetPathThe path to the dataset, relative to the StreamingAssets folder
Returns
A full path relative to the root of the project. Data/StreamingAssets for UWP and Lumin, Assets/StreamingAssets for the editor, unmodified for other platforms

◆ GetStoragePath()

static string GetStoragePath ( string path)
inlinestatic

Returns the correct path based on the current platform.

◆ IsPlayMode()

static bool IsPlayMode ( )
inlinestatic

returns ONLY true if we are running in Play Mode

◆ IsRecordingPlayMode()

static bool IsRecordingPlayMode ( )
inlinestatic

returns true if we are running in Play Mode with a Recording

◆ IsSimulatorPlayMode()

static bool IsSimulatorPlayMode ( )
inlinestatic

returns ONLY true if we are running in Play Mode in Simulator Mode

◆ IsUsingBuiltInRenderPipeline()

static bool IsUsingBuiltInRenderPipeline ( )
inlinestatic

◆ IsVuforiaEnabled()

static bool IsVuforiaEnabled ( )
inlinestatic

returns true if we have access to Vuforia (on a mobile device OR in the emulator in Unity Pro with a webcam connected)

◆ IsWebCamPlayMode()

static bool IsWebCamPlayMode ( )
inlinestatic

returns true if we are running in Play Mode with a WebCam

◆ IsWebCamUsed()

static bool IsWebCamUsed ( )
inlinestatic

If the web cam is enabled.

◆ IsWSARuntime()

static bool IsWSARuntime ( )
inlinestatic

returns true ONLY if we are in any one of the WSA modes

◆ StripStreamingAssetsFromPath()

static string StripStreamingAssetsFromPath ( string fullPath)
inlinestatic

Returns the file path without the first two elements of the path for example it would remove '*‍/StreamingAssets'.

Property Documentation

◆ ScreenOrientation

ScreenOrientation ScreenOrientation
staticget

Returns the current screen orientation. In the Editor, the orientation is always LandscapLeft.