Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by WhispyWoods · Nov 08, 2015 at 06:32 AM · networkinglobby

How can players select their own preferences in the lobby?

I'm not exactly sure how to ask this correctly, since I'm not that good in unity...and english is not my mother language, sorry about that.

I'm doing some simple projects to understand the new networking options in unity. What I'm trying to do now is 2 scenes. The lobby and the main game. In the lobby each player should select his "deck" (just for the example) in a dropdown, and then press "ready". Both players are taken to the main game and each gameplayer prefab (or lobbyplayer) should have the respective deck data.

Can someone give me some idea to make this setting? I don't know if some gameobjects (like the menu itself) should have a network identity, since each player shouldn't be able to see the menu of the other one. I really want to learn to work with this, but networking is definitely not my forte. I hope someone can give me some tips at least.

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
0

Answer by Dibbie · Nov 10, 2015 at 04:57 AM

Im not completely sure how youd do a drop-down UI system (it would require a decent amount of code creating your own custom one, and I dont think there is a predefined one)

However, you could even use the UI Toggle/checkbox, and put your code on its checkstate in the inspector.

So, then in your code, youd just have a public function, with an if statement that checks if that toggle is checked or not, and if it is checked, then they want Deck 1, or Deck 2 or Deck 3 or whatever.

Then you can use PlayerPrefs to save their choice to load into your next scene. Then load the details from PlayerPrefs, and then do whatever your code is supposed to do to load Deck 1 if it happens to be that, Deck 2, etc.

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

CS0030 Cannot convert type 'UnityEngine,Networking.PlayerController' to 'PlayerController' 1 Answer

UNET StopServer() without reloading lobby scene 2 Answers

Delay the spawning of networked player objects. Why is this so difficult with UNet..... 1 Answer

ClientRpc s are not called 1 Answer

How do I use an InputField to change a player object's variable? 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