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 endlessBacon · Aug 29, 2015 at 02:38 AM · c#uinetworkingtext

Score UI per player

I have a simple multiplayer game. Each player has a score I want to show on their screen. After my first attempt at the ui, it appears that all players are sharing a single Text component which is not good. How do I do UI that is not networked and is per player? Thanks for your time.

Comment
Add comment · Show 1
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 SpaceManDan · Aug 29, 2015 at 05:27 AM 0
Share

This question is so open ended it's very hard to answer. There are many ways to do this but for the answer to be any use we need to know what you know.

Do the players already have individual scores? I am not certain if when you say "Each player has a score I want to show on their screen." if you mean in design or actually in code you have a score for each player. Are you able to track that info already but you just need to feed it into the UI or are you not able to keep track of two scores at once yet. I think we need to know that before we can answer you about what direction to head

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by endlessBacon · Aug 29, 2015 at 03:17 PM

@SpaceManDan My scoring system is in place already. In my scene I have a text ui object. My player prefabs have a script attached to them for scoring that has a reference to the text object. Note that the player score is NOT a static variable, so they each have their own value. When their score changes, it updates the text of the text object. That all works until a 2nd player joins the game. At that point it appears that they are referencing the same text object even though I didn't explicitly network any of that. For my networking, I'm just using the built in stuff. Hope that helps clear it up.

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 SpaceManDan · Aug 29, 2015 at 06:43 PM 1
Share

Ok, looks like where you need to go with this is study up on

http://docs.unity3d.com/ScriptReference/NetworkView.html

particullarly newtworkView.observed. The answer to having each player viewing only their network view is in here.

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

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

Related Questions

Using PlayerPrefs to store string but it won't update on my UI 1 Answer

How do I make an external text document show only between certain lines in UI Text 1 Answer

Text Objects do Lerp 0 Answers

How to restrict user from typing certain numbers in input field 3 Answers

UI Text not displaying public int but will display private int 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