Change keystore path from code?

Hello. I want to build my application using PlayerSettings.Android and BuildPipeline. In Unity Editor in Player Settings > Android > Publishing Settings I can use existing key and press a button “Browse Keystore”, then find needed key, enter keystore password, then chose this key in alias and enter password. In PlayerSettings.Android there are following fields: keyaliasName, keyaliasPass, keystoreName, keystorePass. How do I use PlayerSettings.Android to browse and select needed key from my script?

Fill the following data into the fields:

  • keyStoreName - full path to the key store you want to use
  • keyStorePass - password for the keystore
  • keyaliasName - name of the key that you want to use
  • keyaliasPass - password for the key you want to use (if any)

You may also want to have a look at uTomate, which has an action where you can conveniently automate the modification of all player settings for android (including the key settings) through the editor without scripting (


PlayerSettings.Android.keyStoreName  =  "keyStoreName ";
PlayerSettings.Android.keyStorePass   =  "keyStorePass ";
PlayerSettings.Android.keyaliasName   =  "keyaliasName";
PlayerSettings.Android.keyaliasPass   =  "keyaliasPass";