How do I change PlayerSettings > Package Name from code?

Hello,

I tried:

string product = “”;
string company = “”;
PlayerSettings.Android.packageName = $“com.{company}.{product}”;
// ‘PlayerSettings.Android’ does not contain a definition for ‘packageName’

How can I modify Project Settings via scripting? – Unity
→ I think I need to Serialize PlayerSettings.asset if that exists somewhere, because I didn’t find it anywhere.

I suggest learning to dig around in the documentation, this took me under a minute to find:
PlayerSettings.SetApplicationIdentifier

2 Likes

Thank you very much.