Hi, Pros,
How can I display a GUI layout by triggering tracker.
Here is my code:
void OnGUI() { if (GUI.Button(new Rect(50,700,100,50), "Clone")) { mCloneAsap = true; } if (GUI.Button(new Rect(200,700,100,50), "Delete")) { mDestroy = true; } if (GUI.Button(new Rect(350,700,100,50), "Description")) { TapSelect(); } if (GUI.Button(new Rect(500,700,100,50), "Exit")) { TapSelect(); } if (mShowScreen) { // scale the help window to fit device screen size // because of this scaling, hardcoded values can be used float deviceDependentScale = Screen.width / 480f; Vector2 screenCenter = new Vector2(Screen.width / 2f, Screen.height / 2f); GUIUtility.ScaleAroundPivot(new Vector2(deviceDependentScale, deviceDependentScale), screenCenter); // draw the instruction dialog GUI.Window(0, new Rect(screenCenter.x - 230, screenCenter.y - 130, 460, 260), DrawWindowContent, "", mGUISkin.window); // reset scale after drawing GUIUtility.ScaleAroundPivot(Vector2.one, screenCenter); } } void TapSelect() { mGUISkin = Resources.Load("UserInterfaceSkin") as GUISkin; mShowScreen = true; //Debug.Log("Enter"+ hit.collider.gameObject.name); } private void DrawWindowContent(int id) { // render the text in the window GUI.Label(new Rect(0, 20, 460, 240), mText, mGUISkin.label); if (GUI.Button(new Rect(240, 210, 210, 40), "Back", mGUISkin.button)) { // Re-enable the VideoPlaybackController // Hide this screen mShowScreen = false; } }
Hello Leslie95,
Here's the Unity Documentation for that value: https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html
Either print it to the console or a Unity Text UI field.
Thanks,
Vuforia Support