Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

GameObject attached script and determining is server or client?

Discussion in 'FPS.Sample Game' started by rsud, May 23, 2019.

  1. rsud

    rsud

    Joined:
    Aug 13, 2010
    Posts:
    85
    HI,
    I'm sure this has been asked already, a pointer would be great to the answer.

    What is a efficient way to determine if its a headless server or client that is running in c#?

    I want to only run some code if I am the server.

    Thanks!
     
  2. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    71