Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
reaperkan

uNet GameObjects

Question

Hello,
I have a question I am confused as hell right now, I have these objects in scene which needs to be disabled /enabled at times called from the clients how do i go on to create this? Any idea?

Thanks

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts


  • 0

If a specific client is the one making the call, you just have that specific client make the rpc call. Like:

 

if(isMine)

{

if(Input("x")) //call rpc

}

 

your most likely not asking if the rpc is yours to call (making sure the local of a specific client is called) so it's telling every network client of that user to call the rpc even tho it's not there's to call. Do you know what I mean? Only the local player (your current game window) should make the call, all copies of you (your player in all the other game windows) should receive it

 

edit: and FYI, idk unet either but that's what it sounds like in terms of other network solutions

Share this post


Link to post
Share on other sites
  • 0

Well, I did a bit of hackish way but it works well, I used SyncVars to sync a bool that is the state of the gameobject and it assigns it 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...