- Home /
How to set ProjectSettings via script
I have found this method to set icons via script: https://docs.unity3d.com/ScriptReference/PlayerSettings.SetPlatformIcons.html However, UnityEditor.iOS.iOSPlatformIconKind, UnityEditor.Android.PlatformIconKind are missing, and PlatformIconKind class itself has internal methods and internal constructor. Why does the documentation show us how to use it then?
Answer by TiaanSmal98 · Jul 09, 2021 at 09:25 AM
Rather late than never!
You will only be able to access those classes for build targets you have installed In other words, if you want to modify iOS icons, you'd need to install iOS build support, you can do this via the Unity hub or the build settings:
Remember to shield your code with platform dependant compilation pragmas:
#if UNITY_IOS
//iOS platform dependant code here
#endif
Can find a full list here: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
Hope this helps someone :)
Your answer
Follow this Question
Related Questions
Updating Player Settings with code 2 Answers
Gizmos icons 0 Answers
Start/Stop Playmode from editor script 10 Answers
mouseposition and clicks in editor sceneview 0 Answers
How do I solve a BuildAssetBundles Compilation Error that only occurs in the Editor? 1 Answer