Log in or register to post comments

Take PHP Value to Object AR

March 7, 2016 - 11:40pm #1

Hi I face the problem with my project.

I'm creating a project then I try to take php value from my localhost and convert it to 3d object on AR, I succeed when I run in unity but after i compiled to apk, the object cannot appear. Can somone help me why the object cannot appear on android app.

this is my code to take php value from my localhost.

using UnityEngine;
using System.Collections;
using System.Linq;
public class video : MonoBehaviour {
	// Use this for initialization
	void Start () {
	IEnumerator GetData() {
		WWW www = new WWW ("localhost:81/get_data2.php");
		while(!www.isDone && string.IsNullOrEmpty(www.error)) {
			gameObject.GetComponent<TextMesh> ().text = " "; //Show progress
			yield return null;

			if (string.IsNullOrEmpty (www.error))
				gameObject.GetComponent<TextMesh> ().text = www.text;
				Debug.LogWarning (www.error);


	// Update is called once per frae
	void Update () {
		StartCoroutine (GetData ());


Log in or register to post comments