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
0
Question by Dblfstr · Jun 04, 2015 at 07:54 PM · androidplayerprefssync

Sync PlayerPrefs Between Phone and Android Wear

Ok, This is a diffult one... maybe..

I made a game in Unity for Android. Works great. -Saves highscore -Save number of games played -Saves total cumulative score -Saves points spend (in game points are used to unlock characters) -Saves unlokced characters -Saves current character -other stuff..

I made an Android Wear version also. -Does the same stuff.

I had to use Android Studio to make an AW compatible app -An android wear app is a mobile app with the android wear apk embedded inside, when you sync with your android wear device, the AW version is transferred via the Google Android Wear app. But data is not synced after that.

So, if I get a highscore of 50 on the phone, it will only be on the phone. If I beat that high score on the watch, it will only be on the watch. same for all data, etc.

Is there a way, without cloud syncing because many android wear devices do not have this capability, to tranfser the playerprefs data between the two apps.

I am open to any option right now.

Can I sync playerprefs data between and phone and a watch?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by abi-kr01 · Jun 05, 2015 at 01:52 PM

not the best solution .instead of writing data to playerpref you can write same data in text file in "application.persistent data path" and move that file around your devices.keep in mind that you have to go to root of app and retrieve that data and pass it around with wifi/blueTh../USB etc.you have to encrypt the data so nobody can crack/update it manually.

Comment
Add comment · Show 3 · 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 Dblfstr · Jun 08, 2015 at 06:29 PM 0
Share

I am not ignoring this answer, but I am hesitant to accept it. It is one possibility, however the data transfer is probably the most crucial part, and therefore what is needed.

I am currenlty attenting to do a google cloud sync, as I believe more AW devices will support this now, my inital research indicated otherwise.

I will leave the question open to future answers, and if none are supplied, I will close this question. Thank you.

avatar image abi-kr01 · Jun 09, 2015 at 07:58 AM 0
Share

if you want to use cloud then you have n no of possibility. you can even create your own php server,cloud etc.

avatar image Dblfstr · Jun 09, 2015 at 02:12 PM 0
Share

I am going to use the cloud save features in Google Play Services. I wanted to have the phone and watch talk directly to each other, but without creating my own plugin, I cannot do this.

avatar image
0

Answer by applemaniac · Jun 09, 2015 at 08:32 AM

Instead of using PlayerPrefs you can also use SQlite to build a database, and read it with your different devices.

Comment
Add comment · Show 2 · 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 Dblfstr · Jun 09, 2015 at 02:15 PM 0
Share

True, I guess my main question shoudl have been, "How can I make the phone and watch talk to each other. was looking for expert advice and examples, I guess, not just scenarios. I appreciate your input though, as I think I have decided how I will accomplish my goal; Google Play Services has a cloud save feature. I wanted direct communication, but this will have to do.

thanks

avatar image applemaniac · Jun 10, 2015 at 06:11 AM 0
Share

You can also have what you want (maybe more directly) by using a server / client structure. Using Unity's $$anonymous$$asterServer can also help you to do something nice. An easy tutorial : https://www.youtube.com/watch?v=GEnkgqSH51E

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

22 People are following this question.

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

Related Questions

does unity 5.3 change player prefs path or file extension on android ? 1 Answer

Does Android delete PlayerPrefs when Updating the App? 2 Answers

Is it okay to store many player preferences for mobile? 1 Answer

DeleteAll not working on android? 0 Answers

Google play achievements problem please help 2 Answers


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