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 asdf123 · Jun 29, 2014 at 12:11 AM · multiplayerscenedatabaseinformation

Connection between menu and scene

I'm for a couple of months trying to figure out how i can take information from menu scene and gameplay scene and vice versa, for example:

I can customize my hero in the menu scene, give him a weapon or a hat for exemple.

But i want to have this information on gameplay scene

i could make a gameobject that dont destroy on load but im making it multiplayer, so i cant

i tried database too but it takes a lot of time to take information from database and to much code, so its certainly the worst way to do that, and it would be so anoying

Someone can help?

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
1
Best Answer

Answer by IvovdMarel · Jun 29, 2014 at 12:33 AM

Storing information just so it persists between scenes does not require a database. Storing information online and sharing it with others does require at least a simple form of a database.

What you're asking is two things.

1) Storing information on the client side. You can store information in PlayerPrefs, so it will persist even when the app stops and restarts. 2) Creating a multiplayer game. This is a lot more difficult. Make sure that you are ready for a task like this. If so, consider what exactly you need from your online system, check out database systems (NoSQL vs MySQL), serialising data as JSON objects etc.

Also, for multiplayer games (depending on what platform you'd like to build) check out GameCenter, Google Play and (if not iOS / Android) Photon Multiplayer solutions.

Comment
Add comment · Show 1 · 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 asdf123 · Jun 29, 2014 at 01:01 AM 0
Share

I can make multiplayer games just fine.. i know how to use rpcs and etc, i'm using photon network, my question is just about the information between scenes, and i think i will look into player prefs, thanks :D

avatar image
1

Answer by Juice-Tin · Jun 29, 2014 at 01:17 AM

Just want to add, you can simply use static variables.

public class SaveData{ public static String hat; }

You can now say: SaveData.hat = "TopHat";

or

Debug.Log(SaveData.hat);

anywhere. The variable will persist between scenes and objects as long as the game is running.

Comment
Add comment · Show 1 · 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 asdf123 · Jul 01, 2014 at 03:06 PM 0
Share

thanks bro, that's what i wanted

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

23 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 avatar image

Related Questions

MLAPI: Is it possible to obtain all connected client ids in the NetworkManager? 1 Answer

Security issues with Multi-player User Database? 2 Answers

Inventory with a Database 0 Answers

can firebase real-time database be used on a pc standalone game? 0 Answers

Storing data on a server to be used for player currency in a multiplayer game 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