Log in or register to post comments

[ASK] Log output Augmented Reality deployment in Android

October 20, 2012 - 7:17am #1

Hi all,

Anyway I am new in Android. I followed the sample tutorial the Vuforia AR with Unity package extension, and everything works fine.

I have a case to put my resource file (*.dat and *.xml) in server instead of embed them in *.apk deployment.

 

I try to modify the generated source code (DataSetLoadBehaviour) :

<code>

private const string DATA_SET_PATH = "Assets/StreamingAssets/QCAR/";

    private const string ResourceUrl = "http://myserver";

    IEnumerator DownloadAndSave(string filename)

    {

        string remoteFile = ResourceUrl + "/" + filename;

        string localFile = DATA_SET_PATH + filename; 

 

        Debug.Log("remoteFile: " + remoteFile);

        Debug.Log("localFile: " + localFile);

 

        if (System.IO.File.Exists(localFile))

        {           

            System.IO.File.Delete(localFile);            

        }

 

        WWW wwwdat = new WWW(remoteFile);

        yield return wwwdat;

 

        System.IO.File.WriteAllBytes(localFile, wwwdat.bytes);

               

    }

 void Awake()

    {

        if (Application.isEditor)

        {

            return;

        }

 

        DownloadAndSave("cave2.dat");

        DownloadAndSave("cave2.xml");

//....

//....

}

 

 

</code>

 

My question are :

  1. Is it possible to do that ? Or am I missing other thing to get this work ?
  2. when apk deployed to Android, where can I get the log/debug output file of Debug.Log (......);

 

Thanks in advance.

 

 

 

[ASK] Log output Augmented Reality deployment in Android

October 22, 2012 - 2:26am #2

Hi, thank you for your inquiry;

my I ask you to post this question in the Unity 3 section of the forum? Thanks!

 

Log in or register to post comments