namespace FishNet.Object.Helping
{
public static class CodegenHelper
{
///
/// Returns if a NetworkObject is deinitializing.
///
///
///
public static bool NetworkObject_Deinitializing(NetworkBehaviour nb)
{
if (nb == null)
return true;
return nb.IsDeinitializing;
}
///
/// Returns if running as server.
///
///
///
public static bool IsServer(NetworkBehaviour nb)
{
if (nb == null)
return false;
return nb.IsServer;
}
///
/// Returns if running as client.
///
///
///
public static bool IsClient(NetworkBehaviour nb)
{
if (nb == null)
return false;
return nb.IsClient;
}
}
}