Search Unity

Custom property list does not copy over to xcode build.

Discussion in 'iOS and tvOS' started by Nemial, Aug 25, 2014.

  1. Nemial

    Nemial

    Joined:
    Feb 25, 2014
    Posts:
    16
    I have changed the .plist to a .txt extension and tried putting it in both Assets/Resources and Assets/Plugins/iOS but to no avail it does not appear in the xCode file browser or have any reference to it. Should i be using XML instead?
     
  2. cbaltzer

    cbaltzer

    Joined:
    Jan 11, 2012
    Posts:
    120
    This also supports a few other extensions (.xib), but seems like not .plist. Try Assets/StreamingAssets/ instead. I can't remember if those show up in the Xcode project or not, off the top of my head.
     
  3. Smilediver

    Smilediver

    Joined:
    May 5, 2011
    Posts:
    72
    There's no way to add files to Xcode project itself, except those mentioned by cbaltzer. If you simply want to open files during runtime, then put them in Assets/Resources folder. Items there are always included in your builds, and they can be accessed in runtime as normal files.
     
  4. Nemial

    Nemial

    Joined:
    Feb 25, 2014
    Posts:
    16
    Assets/Resources you say? as a .plist or .txt? because whereas the unity player can find the plist and get data from it running it through xCode on a device can't. I am using this to read in my plist.
     
  5. Smilediver

    Smilediver

    Joined:
    May 5, 2011
    Posts:
    72
    If you put your assets in Assets/Resources, they will be packed into assets file, so I'm not sure you can access them using standard File and other C# API. But you can load that file using Resources.Load as a TextAsset and get the file contents using either .text for .bytes properties. IIRC file extension doesn't matter.