x


Diferent GUI on server and client

Hi,

Is it possible to create a multiplayer game (non-authorative) with a diferent GUI on the server and the client?

Thanks for any help,

more ▼

asked Mar 13 '10 at 05:49 PM

maveryck21 gravatar image

maveryck21
239 29 32 44

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Yes, if you're using the networking components you can simply check if(Network.isServer) in your OnGUI call.

e.g.

function OnGUI(){
  if(Network.isServer){
    // server controls in here

  }else{
    // client controls in here
  }
}
more ▼

answered Mar 13 '10 at 07:41 PM

Flimgoblin gravatar image

Flimgoblin
151 8

Ok thanks..But I forgot to mention that I'm using the smartfox server to have multiplayer support..does it work in the same way with the smartfox?

Mar 13 '10 at 08:36 PM maveryck21

Hmm looking at smartfox (very briefly, so I could be wrong) it appears to be a separate server running in Java, not a second unity client like the built in Networking.

So, presumably you wouldn't use Unity for your server's GUI, no?

Mar 14 '10 at 10:58 AM Flimgoblin
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3669
x679

asked: Mar 13 '10 at 05:49 PM

Seen: 764 times

Last Updated: Mar 13 '10 at 05:49 PM