- Home /
set Application icon from script for build?
I create my own editor that has functionality to build the apps from script, I need to change to application icon from script, how to do it correctly. currently I'am doing like this:
var texImporter : TextureImporter = TextureImporter.GetAtPath(AssetDatabase.GetAssetPath(getAppState().appIcon));
texImporter.isReadable = true;
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(getAppState().appIcon));
var sizeList : int[] = PlayerSettings.GetIconSizesForTargetGroup(BuildTargetGroup.Standalone);
var iconList : Texture2D[] = new Texture2D[sizeList.length];
var ndx : int = 0;
for(iconSize in sizeList){
iconList[ndx] = Instantiate(getAppState().appIcon);
iconList[ndx].Resize(iconSize,iconSize,TextureFormat.ARGB32,false);
ndx++;
}
PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.Standalone,iconList);
but the icon does not change.
Comment
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Will Unity 3.0 have a scriptable Input Manager 1 Answer
Unity 5.1.1P3 , append not available. 0 Answers
custom launch icon for windows 7 64bit problem 0 Answers
Game icon not visable 0 Answers