Author Topic: Bug report on Windows Phone 8  (Read 3466 times)

dweebster

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Bug report on Windows Phone 8
« on: September 09, 2013, 04:52:21 AM »
In the file NGUITools.cs File.ReadAllBytes(path) is used.

This seemed to work fine with Unity 4.2 but with 4.3 it doesn't anymore.

So to fix it the code needs to be adjusted to the following:

#if UNITY_WEBPLAYER || UNITY_FLASH || UNITY_METRO || UNITY_WP8
      return null;
#else
      if (!NGUITools.fileAccess) return null;

      string path = Application.persistentDataPath + "/" + fileName;

      if (File.Exists(path))
      {
         return File.ReadAllBytes(path);
      }
      return null;

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug report on Windows Phone 8
« Reply #1 on: September 10, 2013, 09:01:23 AM »
I'll add it in.