Search Unity

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:
    89
    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:
    217