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?

PlayerSettings.bundleVersion = bundleVersion;
PlayerSettings.Android.bundleVersionCode = bundleVersionCode;

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 :slight_smile: