public static bool Initialize(StringBuilder errorMessage) { if (errorMessage != null && errorMessage.Capacity != maxErrorMessageLength) throw new ArgumentOutOfRangeException("Capacity of the error message must be equal to " + maxErrorMessageLength); return Native.GameNetworkingSockets_Init(IntPtr.Zero, errorMessage); }
public static bool Initialize(ref NetworkingIdentity identity, StringBuilder errorMessage) { if (errorMessage != null && errorMessage.Capacity != maxErrorMessageLength) throw new ArgumentOutOfRangeException("Capacity of the error message must be equal to " + maxErrorMessageLength); if (Object.Equals(identity, null)) throw new ArgumentNullException("identity"); return Native.GameNetworkingSockets_Init(ref identity, errorMessage); }