Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
5
Question by fractalfrenzy · Jul 27, 2014 at 09:17 PM · keystorepassword

Publishing Settings (keystore password) not saving

Everytime I quit and restart Unity, the keystore password needs to be entered into Publishing Settings again or I cannot build to Android. Isn't there some way to save it?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
27
Best Answer

Answer by yukelzon · May 18, 2015 at 03:28 PM

If you want to "presign" your application, create or choose the key you intend to use so that it is saved as the project default key (and select the desired alias for the sake of being thorough), then add a new cs script in the Editor folder and replace the default content (replacing the capitalized words with the values for your specific project) with:

Code (CSharp):

 using UnityEngine;
 using UnityEditor;
 using System.IO;

 
 [InitializeOnLoad]
 public class PreloadSigningAlias
 {
  
     static PreloadSigningAlias ()
     {
         PlayerSettings.Android.keystorePass = "KEYSTORE_PASS";
         PlayerSettings.Android.keyaliasName = "ALIAS_NAME";
         PlayerSettings.Android.keyaliasPass = "ALIAS_PASSWORD";
     }
  
 }

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image alon-k · Feb 18, 2016 at 04:15 PM -1
Share

@yukelzon This looks very helpfull, but can you elaborate? I'm on $$anonymous$$ac, where is the Editor folder? do you mean ~/Applications/Unity?

Thanks!

avatar image Piotrku alon-k · Mar 02, 2016 at 02:35 PM 2
Share

he means Editor folder in your Project's directory. You have to create it if it doesn't exist

avatar image zakirshikhli · May 27, 2016 at 09:04 AM 0
Share

Thank You.

avatar image ditzel · Nov 02, 2017 at 09:25 PM 0
Share

But this will compiled in your apk and can be easily reverse engineered?

avatar image CrandellWS ditzel · Nov 18, 2017 at 01:34 PM 0
Share

It is set in the player settings and should not be compiled into the apps

avatar image CrandellWS · Nov 18, 2017 at 01:34 PM 0
Share

you can create an Editor folder in the assets folder as well...

      // place the keystore file in root of project and not in the assets folder...
      // you will have ~/Assets, ~/Library, ~/Project, ~/Temp, ~/my$$anonymous$$ey.keystore ... etc
      PlayerSettings.Android.keystoreName = "my$$anonymous$$ey.keystore";
      PlayerSettings.Android.keystorePass = "my$$anonymous$$eyPassword";
      PlayerSettings.Android.keyaliasName = "my$$anonymous$$eyAliasName";
      PlayerSettings.Android.keyaliasPass = "my$$anonymous$$eyAliasPassword";


https://answers.unity.com/answers/733975/view.html

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Lost key password(i have keystore file with password and Alias but forgot password) 0 Answers

What is the different between key password? 1 Answer

Lost Keystore Password.... 3 Answers

Can non-admin users change their own password using the Unity Asset server system? 0 Answers

Bring class variable into other class 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges