Question by
RobW81 · Sep 09, 2015 at 02:07 PM ·
networking
Unet Checking isServer on Disabled Objects
I have game where I load my entities at start from an XML file and then disable them until they are triggered by some activation event. Now that I am adding Unet to game I am having issues because I can't check to see if the the object is on the server because isServer always returns false. Is there a way to check if you are on the server so I can still call a function and do server specific code before the object gets activated?
Comment
Answer by AndreasLAN · Sep 14, 2015 at 10:34 AM
The isServer function only works on the networkBehaviour attached to the spawned player object so you should somehow keep track of the object there.