[Add] FishNet

This commit is contained in:
2026-03-30 20:11:57 +07:00
parent ee793a3361
commit c22c08753a
1797 changed files with 197950 additions and 1 deletions
@@ -0,0 +1,44 @@
namespace FishNet.Object.Helping
{
public static class CodegenHelper
{
/// <summary>
/// Returns if a NetworkObject is deinitializing.
/// </summary>
/// <param name = "nb"></param>
/// <returns></returns>
public static bool NetworkObject_Deinitializing(NetworkBehaviour nb)
{
if (nb == null)
return true;
return nb.IsDeinitializing;
}
/// <summary>
/// Returns if running as server.
/// </summary>
/// <param name = "nb"></param>
/// <returns></returns>
public static bool IsServer(NetworkBehaviour nb)
{
if (nb == null)
return false;
return nb.IsServerStarted;
}
/// <summary>
/// Returns if running as client.
/// </summary>
/// <param name = "nb"></param>
/// <returns></returns>
public static bool IsClient(NetworkBehaviour nb)
{
if (nb == null)
return false;
return nb.IsClientStarted;
}
}
}