Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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
1
Question by Jeezy · Jul 04, 2015 at 09:55 AM · networkingrpcunity multiplayerserverside

UNET - Trigging an action on one client from the server

So I've been stumped on this issue for a while now. Basically I'm trying to send a RPC to a single client. Like when a player damages another, I'm trying to have the server send the data to the client who attacked, and render some text on their screen with the info.

I've tried a plethora of different things, and a ton of googling, but I just can't figure it out. The last thing I tried using was NetworkServer.SendToClientOfPlayer, but I couldn't really get it to work. I'd post the code but it's just a disaster because of all the crap I've tried.

Does anyone happen to have an example on how to do this? I'd really appreciate it. The closest example I've found is this, but it doesn't seem to be exactly what I'm looking for. http://forum.unity3d.com/threads/rpcing-to-a-specific-client.334293/#post-2164146

I've also gone over this page quite a few times, but I'm still having trouble grasping it. http://docs.unity3d.com/Manual/UNetMessages.html

Comment
Add comment · Show 4
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 meat5000 ♦ · Jul 04, 2015 at 09:49 AM 0
Share

What these tutorials. They're ok.

https://www.youtube.com/watch?v=NLnzlwCRjgc

avatar image Jeezy · Jul 04, 2015 at 12:06 PM 0
Share

I've watched nearly that entire series, did I happen to miss something in there?

avatar image nsmith1024 · Aug 09, 2015 at 03:48 AM 0
Share

Did you figure this out because I have the same problem. I cant believe unity has all this fancy functions but doesnt allow the server to call back the client who send it a command.

avatar image Jeezy · Aug 09, 2015 at 04:07 AM 0
Share

This is basically what I ended up doing, probably a better way to do it, but it works. Call the command function from the desired client. I also added comments explaining my understanding of it. http://pastebin.com/is$$anonymous$$i4Nba

0 Replies

· Add your reply
  • Sort: 

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

Rpc is received by client but Cmd is not received by server 2 Answers

How to fix "ClientRpc call on un-spawned object" error, using UNET 2 Answers

Photon (PUN) Type Serialization Error on RPC 2 Answers

Missing @RPC attribute error while it is there. 1 Answer

Networking: Standalone Simulation Server 0 Answers


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