Author Topic: Standalone server, execute specific script in scene  (Read 1803 times)

alexJ

  • Guest
Standalone server, execute specific script in scene
« on: August 11, 2013, 09:08:42 AM »
Hi all,
I'm new on Thasharen TNet, and I have a question about the standalone server:
In my scene I have a script that I want executed by the server, for each instance of the prefab.
In my script I added if(TNManager.isHosting) to prevent client using the game script, but now how can I add this script to the standalone ?
Thanks !

Alexandre

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Standalone server, execute specific script in scene
« Reply #1 on: August 11, 2013, 02:26:45 PM »
Er... what? The server, as in, the physical executable is not able to execute Unity scripts. Unity scripts can only be executed on clients.

Furthermore, TNManager.isHosting is going to be 'true' for one of the connected clients. I think you're confusing what it means to be a "server" and what it means to be a "host".