Monday 28 September 2015

How to get rid of entering Android KeyStore Password everytime for Unity3D Android Build


It's so annoying to enter android keystore password again and again when you restart the Unity3d , so if u want to get rid of that here's the editor script for it


Note: Save your Android .keyStore file in the same directory of the Unity Project i.e. in the same directory of Assets,Library,ProjectSettings etc.





1. Create a folder Editor in Assets if not there already,


2. Create a C# Script give whatever name you want , I am giving PreloadAndroidSigning
3. Copy the below code




using UnityEngine;
using UnityEditor;
using System.IO;

[InitializeOnLoad]
public class PreloadAndroidSigning
{
    
    static
PreloadAndroidSigning ()
    {
        PlayerSettings.Android.keystorePass = "xxxxxxx";
        PlayerSettings.Android.keyaliasName = "com.xxx.xxx";
        PlayerSettings.Android.keyaliasPass = "xxxxxxx";
    }
    
}






Enjoy !