Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

data files not pushed to Android?

Discussion in 'AR/VR (XR) Discussion' started by mettinger, Dec 28, 2015.

  1. mettinger

    mettinger

    Joined:
    Oct 29, 2015
    Posts:
    6
    In my GearVR app I'm using data files (csv files) to prepare the scene. On startup, a script attached to the camera loads the data files and constructs objects based on the data. When I run the scene within Unity, the scene renders properly. But in GearVR the scene is blank, i.e. none of my objects appear. I'm wondering if this is because I'm not putting my data files in the proper location to get bundled in the .apk file? Do I have to do something special to read the data when I'm using GearVR versus directly in Unity?
     
  2. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Unity has special folders that you can use. I believe you can put it in a folder named Resources the asset is guaranteed to be packaged.

    I would use the "Streamed Assets" folder because this won't modify your files (by compressing them) at all when it creates the apk.
    Note: I'm not sure if it needs a space in the name. Do a quick Google search. I also recommend reading about the other special folders to see if there's a better match.

    Best of luck
    E
     
  3. mettinger

    mettinger

    Joined:
    Oct 29, 2015
    Posts:
    6
    Thanks E! Resources folder worked perfectly.
     
  4. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Awesome!