- Home /
Playernames on top of the gameobject on a text mesh
Hi,
I went through the example 4 of M2H's network tutorial but i have a few questions :
- I store my playername in playerPrefs.
- I send my username by rpc to the server.
- The server adds the name linked to the networkview ID in an array.
now my question is, how do i get all the names assigned to the textmeshes. Does the server need to do this or the clients ?
I know how to get my viewID, i can compare it to whats in the list. I think i just got lost at the end. Eddy.
Answer by AnaRhisT · Jul 02, 2010 at 11:59 PM
It's simple, You put into the 3D Text(Text Mesh).Text the value of ur PlayerPrefs.GetString(playerName);
GetComponent (TextMesh).text = PlayerPrefs.GetString(playerName);
No, that way i will get my last player's name on all the text meshes.
Nah, you won't. Exactly like u don't get the last player's name on the scoreboard, It's a bit more complicated then that then, when I programmed my blue/red $$anonymous$$m, I also remember I added stuff to the class that is there, etc..Took me like a day to finish that..
well I have been trying this for the last 2 days and i can't get it to work. There is allways something wrong. Would you be willing to share some code ?
I don't think my code will help you to achieve that, maybe I can help u in private, I'm "AnaRhisT"/"AnaRhisT12" in mIRC, if u see me there, send a message.
Hey thanks for the offer but i got it to work last night. It still needs tweaking and i still don't understand all whats happening but i'll go through it more. But at least it's working now. Thanks again.
Your answer
Follow this Question
Related Questions
URP Postprocessing & TextMesh Pro 1 Answer
How to update TMP Pro Sprite Shader using script/C#? 1 Answer
Text Mesh Pro : How to override standard text styling tags ? (bold, underline, etc ...) 0 Answers
Small Text looks jagged and washed out or pixelated on Text Mesh object 3 Answers
Fade TextMesh font C# 4 Answers