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 Jrc4055 · Jul 29, 2013 at 05:16 PM · multiplayernetworkrpcnetworkviewid

Sending info to/from different networkViews

I have a player with a NetworkView of 1. I need to send an RPC to a gameobject on the server with a networkview of 4. However, the player is only sending info to the gameobject with a NetworkView of 1, which doesn't have the script player is trying to access. How can I send the RPC through the correct NetworkView?

Comment
Add comment · Show 2
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 gardian06 · Jul 29, 2013 at 05:23 PM 0
Share

are you asking how do you talk to an object by NetVeiwId, how do you talk to a specific object on a specific system, or how do you talk to a specific object on all systems?

is this info co$$anonymous$$g from a client, or the server. what is your base framework architecture for you networking: P2P, simple client-server, authoritarian server-client?

the answers to these greatly change the accuracy, and value of the answers you get.

avatar image gardian06 · Jul 29, 2013 at 05:27 PM 0
Share

after re-reading: ??????

why are the objects on each system different: have different components, and from what I understand all of the objects on a system have the same NetworkVeiwID number. ins$$anonymous$$d of each object having a synchronized NetworkVeiwId across all systems that is unique to that object?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Jamora · Jul 29, 2013 at 06:09 PM

You need to do some networking magic here. a NetworkView ( NV ) can only communicate with one other NV on each client, the one with the same NetworkViewID, which is causing your problem.

Because of this limitation, it is impossible to make NV #1 to talk with NV #4 directly. Instead we can use NV #4 from the GameObject that has NV#1. What you need to do is call NV #4 from a script that is cconnected to NV #1 and tell it to send the RPC instead. The code looks something like:

 //in GameObject that has NV#1
     gameObjectThatHasNV4.networkView.SendRPC(/*parameters*/);
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

17 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

Related Questions

Array of NetworkViewID passing in a RPC 1 Answer

get return on networkView.RPC 1 Answer

Does the position change need state synchronization? 2 Answers

How do you remove RPC's from the RPC buffer that where created on behalf of a player that is now disconnected with an authoritative server? 1 Answer

Photon Networking: RPC call doesn't work over other clients 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