x


How Do I Procedurally Change the Icon, Splash Screen, and Version #?

I am using a custom C# script to build both my Lite and Free versions of an iPhone app from a custom menu option.

I am setting the BundleIdentifier, and the Product Name via the PlayerSettings class, and using the BuildPipeline.BuildPlayer function to build my XCode projects.

Is there a way within unity, without resorting to shell scripts, to modify the Icon and Splash Screen for each player, and to a lesser extent, the version # as well?

more ▼

asked Nov 18 '10 at 06:37 PM

Matt 18 gravatar image

Matt 18
11 1 1 2

Did you find a solution? I want to do the same thing.

Jan 21 '11 at 10:34 AM SoundGuy32

Me too, please tell us if you succeeded! :)

Jul 27 '12 at 11:31 AM BazLevelUp
(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest
PlayerSettings.bundleVersion = bundleVersion;

Texture2D[] icons = new Texture2D[] {
 AssetDatabase.LoadMainAssetAtPath(srcFolder + "ico_iphone2x.jpg") as Texture2D,
 AssetDatabase.LoadMainAssetAtPath(srcFolder + "ico_ipad.jpg") as Texture2D,
 AssetDatabase.LoadMainAssetAtPath(srcFolder + "ico_iphone.jpg") as Texture2D
};

PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.iPhone, icons);

You can not change SplashScreen from scripts - there is no API at the moment. So what we do is simply override current splash image by copying over another file (from scripts). Takes a bit longer, because Unity reimports the file, but it does the job :)

more ▼

answered Jul 30 '12 at 01:26 PM

Paulius Liekis gravatar image

Paulius Liekis
7.3k 16 24 45

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1998
x46
x17

asked: Nov 18 '10 at 06:37 PM

Seen: 1175 times

Last Updated: Jul 30 '12 at 01:26 PM