Log in or register to post comments

create and access a database

March 8, 2013 - 8:03am #1

Hi, Pros,

I want to access some information from a database. Is any way to create a database when app runs in local? It does not have to be on some server. I just want to  save some text in local and it could be triggered by target image. How can I do this in Unity 3D? Do I have to use php and mysql? I just want to have a simple function to save strings. It does not have to be in some other servers, local will be fine.

Thx so much!!!

create and access a database

March 14, 2013 - 9:42pm #24

Hi there,

 i hv fixed. Hhaha. I am so stupid!! just create a new 3Dtext with empty string and attach just one script to parent object : GetComponentInChildren(TextMesh).text = ""+timer;

 

 

thats done!! :)

create and access a database

March 14, 2013 - 9:40pm #23

Hi there,

Never mind, I fixed it. so much!!!

Much appreciate!!!

create and access a database

March 14, 2013 - 9:00pm #22

"Does not show anything" isn't a very helpful description.  If you just created a new 3D Text object and made it a child of the marker it would show something.  You might have to adjust the values (scale, position, thickness) but it'll show something.  If it doesn't, then you aren't setting up the text object correctly.

If you dropped the script I just gave you on the ImageTarget, and modified it so that you were getting an array of strings correctly, you should see the text change.  The same should be the case if you put the Text anywhere in the heirarchy and the script on the parent.

So if a default TextMesh appears but disappears when you change the value with the scirpt, then the problem might be with the datatype or contents of the array.  

If the text appears but disappears when you touch it, then the problem is likely a positioning error either with the raycast (what's your Z depth value reporting on the location where the object should be?  Is it futher than your far clip/closer than your near clip?)

Sorry to be blunt but there could be any number of 1000 things wrong and we have no idea what you are trying or what exactly is not working.  Start with the steps above, use a process of elimination to see what's causing "nothing" to show up.  What's the console say?  Are there any error messages?  Have you googled them?  Have you used Debug.Log to check the position of the Text object you are trying to position?  Or the position of your raycast?  Have you tried using the Raycast debug to draw lines to figure out if the position of your text object is correct?

Dynamically create 3D text

March 14, 2013 - 8:40pm #21

Hi there,

Can you say more clear about how to do that.

I now have create an emptuy 3Dtext and sign the value to it.

But it still does not show anything.

create and access a database

March 14, 2013 - 7:11am #20

Hi there,

I don't have too much experience with instantiating anything other than prefabs.  So two things you could try:

If you are comfortable making a prefab with a Text Mesh applied to it already, you can make a script that Instantiates the prefab where you want the text mesh to appear.

Or

you can apply a TextMesh in advance and make the text field empty or something like a placeholder ellipse "...", and make sure the properties are set so it's visible and facing the right way.

You can then place a script on the parent of the object with the textmesh on it and do something like the following in C#:


	private int modulous = 0;
	private int atom = 0;
	public TextMesh dia;
	public TextMesh[] objects = new TextMesh[9];
	
	// Use this for initialization
	void Start () {
		objects = GetComponentsInChildren<TextMesh>();
		
	}
	// Update is called once per frame
	void Update () {
	
		if (modulous++ % 100 == 0)
		{
			foreach (TextMesh tm in objects) {
				
			tm.text = anArrayOrListOfSentencesFromEarlierExample[atom];
			Debug.Log("TEXT PROPERTY IS"+tm.text);
	
			if (atom < anArrayOfSentencesFromEarlierExample.Length) //Or use Count Here if you are using lists
			atom++;
			}
			
		}
	}

You'll have to adapt this, I stuck a modulous in so that it slows the update down incase it speeds through too quickly.  I know this works, its from an old project. Obviously anArrayOfSentencesFromEarlierExample would be your playerpref data

create and access a database

March 13, 2013 - 10:32pm #19

Hi, Thx so much for your advice.

But no. It is still not wroking. I thought create a 3D text is easier than display a guitext cuz it just create some buttons and layout. Maybe I am wrong. But at this point, I still want to know is there any way to show the saved text?

using UnityEngine;

using System.Collections;

public class DragObject : MonoBehaviour {

   public GUIText message = null;

   private Transform pickedObject = null;

   private Vector3 lastPlanePoint;

public string name = null;

public  GameObject objText = new GameObject("TextObject");

public string count = null;

public TextMesh myText = null;

public int n = 0;

public Font guiFont = Resources.Load("Fonts/MyFont", typeof(Font)) as Font; 
void Update () {
        Plane targetPlane = new Plane(transform.up, transform.position);
        //message.text = "";
        foreach (Touch touch in Input.touches) {
            //Gets the ray at position where the screen is touched
            Ray ray = Camera.main.ScreenPointToRay(touch.position);
            //Gets the position of ray along plane
            float dist = 0.0f;
            //Intersects ray with the plane. Sets dist to distance along the ray where intersects
            targetPlane.Raycast(ray, out dist);
            //Returns point dist along the ray.
            Vector3 planePoint = ray.GetPoint(dist);
            //Debug.Log("Point=" + planePoint);
            //True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
            if (touch.phase == TouchPhase.Began) {
                 //Struct used to get info back from a raycast
                 RaycastHit hit = new RaycastHit();
                 if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
                     pickedObject = hit.transform;
                     lastPlanePoint = planePoint;
                 } else {
                     pickedObject = null;
                 }
            //Move Object when finger moves after object selected.
            } else if (touch.phase == TouchPhase.Moved) {
                 if (pickedObject != null) {
                     pickedObject.position += planePoint - lastPlanePoint;
                     lastPlanePoint = planePoint;
                 }
            //Set pickedObject to null after touch ends.
            } else if (touch.phase == TouchPhase.Ended) {
                
				
				Debug.Log("**************************************");
				myText= objText.GetComponent( typeof (TextMesh)) as TextMesh;
				objText.AddComponent(typeof (MeshRenderer));
				objText.renderer.material = guiFont.material;
				objText.transform.position=pickedObject.position;
				objText.transform.parent = gameObject.transform.parent;
				myText.text = "HeLLO";
				myText.font = guiFont;
				pickedObject = null;
	
            }
        }
		
   }

Here is what I have now.

I have comment out the gui stuff, just want to dynamically create a 3D text. But no still does not work! What is the wrong thing?

 

create and access a database

March 13, 2013 - 10:32pm #18

Hi, Thx so much for your advice.

But no. It is still not wroking. I thought create a 3D text is easier than display a guitext cuz it just create some buttons and layout. Maybe I am wrong. But at this point, I still want to know is there any way to show the saved text?

using UnityEngine;

using System.Collections;

public class DragObject : MonoBehaviour {

   public GUIText message = null;

   private Transform pickedObject = null;

   private Vector3 lastPlanePoint;

public string name = null;

public  GameObject objText = new GameObject("TextObject");

public string count = null;

public TextMesh myText = null;

public int n = 0;

public Font guiFont = Resources.Load("Fonts/MyFont", typeof(Font)) as Font; 
void Update () {
        Plane targetPlane = new Plane(transform.up, transform.position);
        //message.text = "";
        foreach (Touch touch in Input.touches) {
            //Gets the ray at position where the screen is touched
            Ray ray = Camera.main.ScreenPointToRay(touch.position);
            //Gets the position of ray along plane
            float dist = 0.0f;
            //Intersects ray with the plane. Sets dist to distance along the ray where intersects
            targetPlane.Raycast(ray, out dist);
            //Returns point dist along the ray.
            Vector3 planePoint = ray.GetPoint(dist);
            //Debug.Log("Point=" + planePoint);
            //True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
            if (touch.phase == TouchPhase.Began) {
                 //Struct used to get info back from a raycast
                 RaycastHit hit = new RaycastHit();
                 if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
                     pickedObject = hit.transform;
                     lastPlanePoint = planePoint;
                 } else {
                     pickedObject = null;
                 }
            //Move Object when finger moves after object selected.
            } else if (touch.phase == TouchPhase.Moved) {
                 if (pickedObject != null) {
                     pickedObject.position += planePoint - lastPlanePoint;
                     lastPlanePoint = planePoint;
                 }
            //Set pickedObject to null after touch ends.
            } else if (touch.phase == TouchPhase.Ended) {
                
				
				Debug.Log("**************************************");
				myText= objText.GetComponent( typeof (TextMesh)) as TextMesh;
				objText.AddComponent(typeof (MeshRenderer));
				objText.renderer.material = guiFont.material;
				objText.transform.position=pickedObject.position;
				objText.transform.parent = gameObject.transform.parent;
				myText.text = "HeLLO";
				myText.font = guiFont;
				pickedObject = null;
	
            }
        }
		
   }

Here is what I have now.

I have comment out the gui stuff, just want to dynamically create a 3D text. But no still does not work! What is the wrong thing?

 

create and access a database

March 13, 2013 - 9:49pm #17

Hi, 
NO, it still does not work.

I just wondering is there any possible way to display those text as a GUIText. Since I run out of time. My project due next week. So I think I can just display those text as a GuiText. How can I do this ?

 

create and access a database

March 13, 2013 - 9:26pm #16

Hi David,

Thx so much.

So you are saying my script for creating 3Dtext is right? It is not working because of the touch thing?

 

create and access a database

March 13, 2013 - 8:46am #15

Sissi, I don't know for sure what the problem is but it looks like you might be missing a font material, and you probably want to make the text a child of the object you are tracking to make your transformations local.

Here's a Javascript version but if you look on the previous page someone attempted a solution in C# (but that one may not be complete, just use it as a guide):

http://answers.unity3d.com/questions/13625/procedurally-generate-a-textmesh.html?page=2&pageSize=5&sort=votes

When you have your text working, you can then do:

yourtextobject.transform.parent = whateverobjectyouaretagging.transform;

This last part may not be necessary but it's how I'd imagine it needs to be done.

create and access a database

March 12, 2013 - 6:57pm #14

Take a look at this thread - http://forum.unity3d.com/threads/93987-Unity-remote-and-touch-phase-ended

It's recommended to set Input.multiTouchEnabled = false to improve TouchPhase.Ended detection.

http://docs.unity3d.com/Documentation/ScriptReference/Input-multiTouchEnabled.html

Have you tried using the Stationary phase to see if that provides better results?

create and access a database

March 12, 2013 - 4:20pm #13

Anyone plz help me with the last function~~ Plz~~~ much appreciate!! thx so much!!!!!!

create and access a database

March 12, 2013 - 4:20pm #12

Anyone plz help me with the last function~~ Plz~~~ much appreciate!! thx so much!!!!!!

create and access a database

March 11, 2013 - 8:35am #11

I hv create a 3D text. However when I run it. It does not show 3Dtext when touch done. How can I fix it ?

Thx soooooo much!

void Update () {
        Plane targetPlane = new Plane(transform.up, transform.position);
        //message.text = "";
        foreach (Touch touch in Input.touches) {
            //Gets the ray at position where the screen is touched
            Ray ray = Camera.main.ScreenPointToRay(touch.position);
            //Gets the position of ray along plane
            float dist = 0.0f;
            //Intersects ray with the plane. Sets dist to distance along the ray where intersects
            targetPlane.Raycast(ray, out dist);
            //Returns point dist along the ray.
            Vector3 planePoint = ray.GetPoint(dist);
            //Debug.Log("Point=" + planePoint);
            //True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
            if (touch.phase == TouchPhase.Began) {
                 //Struct used to get info back from a raycast
                 RaycastHit hit = new RaycastHit();
                 if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
                     pickedObject = hit.transform;
                     lastPlanePoint = planePoint;
                 } else {
                     pickedObject = null;
                 }
            //Move Object when finger moves after object selected.
            } else if (touch.phase == TouchPhase.Moved) {
                 if (pickedObject != null) {
                     pickedObject.position += planePoint - lastPlanePoint;
                     lastPlanePoint = planePoint;
                 }
            //Set pickedObject to null after touch ends.
            } else if (touch.phase == TouchPhase.Ended) {
                
				
				Debug.Log(PlayerPrefs.GetString(count+n));
				myText= objText.GetComponent( typeof (TextMesh)) as TextMesh;
				objText.AddComponent(typeof (MeshRenderer));
				objText.transform.position=pickedObject.position;
				objText.transform.parent = gameObject.transform;
				myText.text = PlayerPrefs.GetString(count+Random.Range(0,n));
				pickedObject = null;
            }
        }
		
   }
	void OnGUI() {
		//if(targetsFound && mShowScreen){
		GUI.Window(0,new Rect((Screen.width/2)-100,(Screen.height/2)-100,500,500),Comt,"Type your comments");
		//}
    }
	void Comt(int id){
		// set the text field for user to type their comments 
		comments=GUI.TextArea(new Rect(20,80,450,200),comments);
		GUI.Label(new Rect(50,70,350,30),"Drag to see others' comments");
		//GUI.Label(new Rect (20, 300, 60, 30), "Nickname");
		//name= GUI.TextField (new Rect(80,300,100,80),name);
		if (GUI.Button(new Rect(240,320,80,30),"OK")){
			PlayerPrefs.SetString(count+n,comments); // save the comment to playerprefs
		
			//Debug.LogWarning(PlayerPrefs.GetString(name));
			comments= "";
			//name= "";
						n++;
		}
		if (GUI.Button(new Rect(100,320,80,30),"Back"))
		{
			mShowScreen = false;
		}
		
		

 

create and access a database

March 10, 2013 - 11:46pm #10

Hi Pro, Thx so much. Since I donnot wanna display all comments at one touch so I use random to generate random number. Now I hv sucessfully saved my data. But how can display it on screen?

I wanna dynamically create a 3D text to display those pre-saved text, and place the 3D text in the position where last touch ends. How can do it?

thx in advance. BTW this is last thing I have to do. thx so much! 

Here is my script, Anyone please help me with the last thing! I really want it to be done ASAP!!

void Update () {
        Plane targetPlane = new Plane(transform.up, transform.position);
        //message.text = "";
        foreach (Touch touch in Input.touches) {
            //Gets the ray at position where the screen is touched
            Ray ray = Camera.main.ScreenPointToRay(touch.position);
            //Gets the position of ray along plane
            float dist = 0.0f;
            //Intersects ray with the plane. Sets dist to distance along the ray where intersects
            targetPlane.Raycast(ray, out dist);
            //Returns point dist along the ray.
            Vector3 planePoint = ray.GetPoint(dist);
            //Debug.Log("Point=" + planePoint);
            //True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
            if (touch.phase == TouchPhase.Began) {
                 //Struct used to get info back from a raycast
                 RaycastHit hit = new RaycastHit();
                 if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
                     pickedObject = hit.transform;
                     lastPlanePoint = planePoint;
                 } else {
                     pickedObject = null;
                 }
            //Move Object when finger moves after object selected.
            } else if (touch.phase == TouchPhase.Moved) {
                 if (pickedObject != null) {
                     pickedObject.position += planePoint - lastPlanePoint;
                     lastPlanePoint = planePoint;
                 }
            //Set pickedObject to null after touch ends.
            } else if (touch.phase == TouchPhase.Ended) {
                
				//myText = GetComponent(TextMesh);
//				myText.text = PlayerPrefs.GetString(name); // how can I display all comments each time one by one?
//				myText.transform.position = pickedObject.transform.position;
				Debug.Log(PlayerPrefs.GetString(count+n));
				
				GUI.Label(new Rect(50,30,350,30),PlayerPrefs.GetString(count+Random.Range(n)));
				pickedObject = null;
            }
        }
		
   }
	void OnGUI() {
		//if(targetsFound){
		GUI.Window(0,new Rect((Screen.width/2)-100,(Screen.height/2)-100,500,500),Comt,"Type your comments");
		
    
		//}
    }
	void Comt(int id){
		// set the text field for user to type their comments 
		comments=GUI.TextArea(new Rect(20,80,450,200),comments);
		GUI.Label(new Rect(50,70,350,30),"Drag to see others' comments");
		//GUI.Label(new Rect (20, 300, 60, 30), "Nickname");
		//name= GUI.TextField (new Rect(80,300,100,80),name);
		if (GUI.Button(new Rect(240,320,80,30),"OK")){
			PlayerPrefs.SetString(count+n,comments); // save the comment to playerprefs
		
			//Debug.LogWarning(PlayerPrefs.GetString(name));
			comments= "";
			//name= "";
						n++;
		}
		
		
	}

 

create and access a database

March 10, 2013 - 2:10pm #9

Just be aware, you shouldn't iterate throught the playerprefs anymore than absolutely necessary (recommended once, on load) because it's very slow, but you can loop thought them if you are saving them with predictable keys:

 

Save your comment (this is probably not working code, but should give you the idea):

For each new comment:

public int n;

public string comment;

...

PlayerPrefs.SetString(comment+n.ToString(), "Foobar");

n++;

Recall from somewhere else: 

public List<String> myList = new List<String>();

...

for (i=0; i<n;i++) {

_comment = PlayerPrefs.SetString(comment+n, "Foobar");

myList.Add(_comment);

}

Now work with this list instead of acessing playerprefs.

create and access a database

March 10, 2013 - 1:24pm #8

Hi, Thx pros, I hv posted this question on unity community, but there is no reply so far... So I still seek help in vuforia here cuz u guys are so active and genius.

I hv taken a look at the link u post, I am not going to edit runtime text. I just want to show all saved data. That's all. But I am thinking it will be good if I dynamically create 3D text to show those data. So I hv modified my code to create a 3D text when user stop draging model. However, I notice I cannot iterator all presaved string by calling playerpref.getstring(). So is there any way to do it ?

And basically what I am doing is really simple -- just wanna a text field where user can l leave their comments and when they drag around the 3d model, those comments which preivous users hv left will pop out at where the 3d model be placed. 

Again thx so much.

void Start () {
   }
   // Update is called once per frame
   void Update () {
        Plane targetPlane = new Plane(transform.up, transform.position);
        //message.text = "";
        foreach (Touch touch in Input.touches) {
            //Gets the ray at position where the screen is touched
            Ray ray = Camera.main.ScreenPointToRay(touch.position);
            //Gets the position of ray along plane
            float dist = 0.0f;
            //Intersects ray with the plane. Sets dist to distance along the ray where intersects
            targetPlane.Raycast(ray, out dist);
            //Returns point dist along the ray.
            Vector3 planePoint = ray.GetPoint(dist);
            //Debug.Log("Point=" + planePoint);
            //True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
            if (touch.phase == TouchPhase.Began) {
                 //Struct used to get info back from a raycast
                 RaycastHit hit = new RaycastHit();
                 if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
                     pickedObject = hit.transform;
                     lastPlanePoint = planePoint;
                 } else {
                     pickedObject = null;
                 }
            //Move Object when finger moves after object selected.
            } else if (touch.phase == TouchPhase.Moved) {
                 if (pickedObject != null) {
                     pickedObject.position += planePoint - lastPlanePoint;
                     lastPlanePoint = planePoint;
                 }
            //Set pickedObject to null after touch ends.
            } else if (touch.phase == TouchPhase.Ended) {
                
				//myText = GetComponent(TextMesh);
				myText.text = PlayerPrefs.GetString(name); // how can I display all comments each time one by one?
				myText.transform.position = pickedObject.transform.position;
				pickedObject = null;
            }
        }
		
   }
	void OnGUI() {
		//if(targetsFound){
		GUI.Window(0,new Rect((Screen.width/2)-100,(Screen.height/2)-100,500,500),Comt,"Type your comments");
		
    
		//}
    }
	void Comt(int id){
		// set the text field for user to type their comments 
		comments=GUI.TextArea(new Rect(20,80,450,200),comments);
		GUI.Label(new Rect(50,30,350,30),"Drag to see others' comments");
		GUI.Label(new Rect (20, 300, 60, 30), "Nickname");
		name= GUI.TextField (new Rect(80,300,100,80),name);
		if (GUI.Button(new Rect(240,320,80,30),"OK")){
			PlayerPrefs.SetString(name,comments); // save the comment to playerprefs
			Debug.LogWarning(PlayerPrefs.GetString(name));
		}
		
		
	}

 

create and access a database

March 10, 2013 - 11:37am #7

Not sure I quite get what you are trying to do from your description.

Are you just trying to recall the player prefs and make it 3D text in a the point where you tapped?  I would probably create a 3D text prefab, use Instantiate, then set the text to your playerpref by using a workaround like what's posted: http://answers.unity3d.com/questions/138373/editable-3d-text.html

Edit: okay I see you are already more or less doing what I described below...

{ If you are trying to get the XY coordinates of your touch and connect them to a "model" in 3D space then yes, you need a raycast, but you'll also probably have to use something like Camera.ScreenToWorldPoint(new Vector3(x,y,z)) and your Distance from camera (z) might have to be something like [pseudocode]     z = distance(camera.transform, model.transform)  }

By the way, again, what you are asking is Unity based stuff and you'll probably have better luck asking your questions:

http://forum.unity3d.com/forums/27-iOS-Development

or

http://answers.unity3d.com/index.html

create and access a database

March 10, 2013 - 11:17am #6

Hi, Thx so much. Thx the previous poster who told me to use Playerprefs to save data. that is really helps. Now I hv made a GUI layout to represent the text field to let user enter their comments, and save to playerprefs as a string value as a key. So next step is to see how to trigger those values one by one when user drag the 3d model around the screen? I know it is in ray section. But I want to pop out a window display the text presaved in previous user at the position where the user is draging model to. Thx so much !! Here is my script, please tell me where to add and what to be added.

  void Start () {
   }
   // Update is called once per frame
   void Update () {
        Plane targetPlane = new Plane(transform.up, transform.position);
        //message.text = "";
        foreach (Touch touch in Input.touches) {
            //Gets the ray at position where the screen is touched
            Ray ray = Camera.main.ScreenPointToRay(touch.position);
            //Gets the position of ray along plane
            float dist = 0.0f;
            //Intersects ray with the plane. Sets dist to distance along the ray where intersects
            targetPlane.Raycast(ray, out dist);
            //Returns point dist along the ray.
            Vector3 planePoint = ray.GetPoint(dist);
            //Debug.Log("Point=" + planePoint);
            //True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
            if (touch.phase == TouchPhase.Began) {
                 //Struct used to get info back from a raycast
                 RaycastHit hit = new RaycastHit();
                 if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
                     pickedObject = hit.transform;
                     lastPlanePoint = planePoint;
                 } else {
                     pickedObject = null;
                 }
            //Move Object when finger moves after object selected.
            } else if (touch.phase == TouchPhase.Moved) {
                 if (pickedObject != null) {
                     pickedObject.position += planePoint - lastPlanePoint;
                     lastPlanePoint = planePoint;
                 }
            //Set pickedObject to null after touch ends.
            } else if (touch.phase == TouchPhase.Ended) {
                 pickedObject = null;
            }
        }
		
   }
	void OnGUI() {
		//if(targetsFound){
		GUI.Window(0,new Rect((Screen.width/2)-100,(Screen.height/2)-100,500,500),Comt,"Type your comments");
		
    
		//}
    }
	void Comt(int id){
		comments=GUI.TextArea(new Rect(20,80,450,200),comments);
		GUI.Label(new Rect(50,30,350,30),"Drag to see others' comments");
		GUI.Label(new Rect (20, 300, 60, 30), "Nickname");
		name= GUI.TextField (new Rect(80,300,100,80),name);
		if (GUI.Button(new Rect(240,320,80,30),"OK")){
			PlayerPrefs.SetString(name,comments);
			Debug.LogWarning(PlayerPrefs.GetString(name));
		}
		
		
	}

 

create and access a database

March 9, 2013 - 1:35am #5

Hi, about the GUI text field, I tried this simple script (attached to the ARCamera) and it does work:

public class SomeGUI : MonoBehaviour {

	void Start () {
	}

	void Update() {
	}
	
	void OnGUI() {
		if (GUI.Button(new Rect(50,50,200,100), "Press Me")) {
			Debug.Log("Button pressed");
		}
		
		GUI.TextField(new Rect(50,150,200,100), "Some Text");
	}	
}

Could you try the same ?

 

create and access a database

March 8, 2013 - 11:37pm #4

HI, Thx 

BTW I have a question regarding vuforia.

How can I add a textfield or text area to ARcamera? Cuz it works under main camera, it does not work under ARcamera.

And is it possible to trigger a text field that can let users to type words?

thx 

create and access a database

March 8, 2013 - 2:05pm #3

I think what you want is to look for PlayerPrefs in Unity.  You can store persistent text data between sessions.  It's a Unity thing, not Vuforia.

create and access a database

March 8, 2013 - 12:01pm #2

Hi, not quite sure how this question is related to Vuforia;

you would have better chances by searching in the Unity forum or other forums on the topics you mention. 

Log in or register to post comments