PostProcessWSA.CreateTestCertificate C# (CSharp) Method

CreateTestCertificate() public method

public CreateTestCertificate ( ) : void
return void
    public override void CreateTestCertificate()
    {
        string certificatePath = PlayerSettings.WSA.certificatePath;
        if (string.IsNullOrEmpty(certificatePath) || !File.Exists(certificatePath))
        {
            if (string.IsNullOrEmpty(certificatePath))
            {
                certificatePath = Utility.CombinePath(Application.dataPath, "WSATestCertificate.pfx");
            }
            if (!File.Exists(certificatePath))
            {
                if (!EditorUtility.WSACreateTestCertificate(certificatePath, base.CompanyName, null, false))
                {
                    throw new UnityException("Failed to create test certificate.");
                }
                AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
            }
            PlayerSettings.WSA.SetCertificate(certificatePath, null);
        }
    }