Skip to content

Instantly share code, notes, and snippets.

@glitchersgames
Last active June 29, 2016 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glitchersgames/692fc5871a9e100be90835fbcbee6545 to your computer and use it in GitHub Desktop.
Save glitchersgames/692fc5871a9e100be90835fbcbee6545 to your computer and use it in GitHub Desktop.
[SyncVar(hook="OnHasPlayerDefUpdated")]
public bool m_HasPlayerDef;
void OnHasPlayerDefUpdated( bool hasPlayerDef )
{
if( m_HasPlayerDef == false && hasPlayerDef )
{
// The server now has the data we need!
}
m_HasPlayerDef = hasPlayerDef;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment