I’m running Unity 4.3 and Xcode 5.0.2 (OSX 10.9). I noticed that when I have “Prerendered Icon” checked in player settings, it doesnt seem to translate to the new “Images.xcassets” created in Xcode. I must manually selected that file in Xcode and check “iOS icon is pre-rendered” in the right Attributes Inspector bar.
That’s correct. With the latest versions with Prerendered checked in Unity, it is not checked in XCode. Therefore the icons have the gloss effect on the device when they should not (prerendered).
Thanks for the info, next time I will check this, I also had some strange problems with this before 4.3 and since just manually edit this field in Xcode.
But please file bug report as 4.3.1 not sure if it made any changes to iOS performance…
Another thing is that on an iPad 1 the gloss effect shows on the icon, but iPad 2 (iOS 7) it does not. I’m guessing iOS 7 no longer adds the gloss effect.
Either way, something is amiss. Bug filed, I’ll edit this post when I receive response.
A quick workaround for this problem. Put this script to your Editor folder. However, you need to download Newtonsoft.Json library and also put it to your Editor folder.
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System.IO;
using Newtonsoft.Json.Linq;
public class PatchPrerenderedIconsOnBuild
{
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
if (target != BuildTarget.iPhone || !PlayerSettings.iOS.prerenderedIcon)
{
return;
}
var file = Path.Combine(pathToBuiltProject, "Unity-iPhone/Images.xcassets/AppIcon.appiconset/Contents.json");
if (!File.Exists(file))
{
return;
}
var obj = JObject.Parse(File.ReadAllText(file));
bool dirty = false;
var properties = obj["properties"];
if (properties == null)
{
dirty = true;
obj["properties"] = properties = new JObject();
}
var preRender = properties["pre-rendered"];
if (preRender == null || !(bool)preRender)
{
dirty = true;
properties["pre-rendered"] = true;
}
if (dirty)
{
File.WriteAllText(file, obj.ToString(Newtonsoft.Json.Formatting.Indented));
Debug.Log("Prerendered icons patched");
}
}
}
I can also confirm the gloss bug, and the somewhat more blurry icons.
Anyone has a clue as for what causes the blurriness? At first I thought it is caused by “compressed” import settings for the icons, but I saw mine all are truecolor.
Maybe it is asset catalog related?