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 GodClaw · May 29, 2013 at 07:16 PM · multiplayernetworkserverlobbychat

Authoritative Server help

How do you do simple commands to clients from a server?

I have a simple chat room set up and I'd like for my player to send his name to the server and the server sends the name to the chat room. I have logging in and the server setup already but I feel it's very unorganized. What's an easy way to implement this?

Comment
Add comment · Show 5
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 Benproductions1 · May 29, 2013 at 10:53 PM 0
Share

RPC's are probably what you want, if your using the normal inbuilt networking

avatar image GodClaw · May 29, 2013 at 11:06 PM 0
Share

Well yeah, but I need to know how to structure it..would I spawn a playerobject into the lobby scene and have that object send rpcs to a seperate Network object in the lobby? It's so confusing.

avatar image GodClaw · May 31, 2013 at 06:52 AM 0
Share

Okay let's say I have a Chatroom gameobject, a Player gameobject and a server gameobject. Now depending on what you choose, you enter the chat as either the server or client. How would I tell the server my clients name and add it to a list in the chatroom?

avatar image Benproductions1 · May 31, 2013 at 07:58 AM 0
Share

Just send a couple RPC's to the clients.
It's quite simple:

  1. Client connects

  2. Client sends server informaion

  3. Server sends all other clients information and adds that client to a list

  4. Server sends that client all other information

avatar image GodClaw · May 31, 2013 at 01:38 PM 0
Share

I understand that I need to use RPC's, i'm asking for an example of one class calling an rpc to another class.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Ashkan_gc · May 31, 2013 at 09:24 AM

Basiclly if the chat room is public only then you can have a chat room manger script attached to a networkview. Then have RPCs like SendChatMessage OnMessageReceived(string msg,string userName) Login(string userName,string passwordHash)

On client and similar stuff on server to get Messages from a user and send it to all others.

Just use standard code organization techniques.

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

15 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

Related Questions

Unity networking tutorial? 6 Answers

Most efficient way to structure a huge online "virtual world" 0 Answers

Player falls through plane/floor (Multiplayer) 1 Answer

Network.player giving me 0 0 Answers

What is the CCU of the default Unity Networking? 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