Interface ISyncValidator<T>
- Namespace
- SteamNetworkLib.Sync
- Assembly
- SteamNetworkLib.dll
Interface for validating sync var values before they are synchronized.
public interface ISyncValidator<T>
Type Parameters
TThe type of value to validate.
Methods
GetErrorMessage(T)
Gets a human-readable error message describing why validation failed.
string? GetErrorMessage(T value)
Parameters
valueTThe invalid value.
Returns
- string
An error message, or null if no specific message is available.
IsValid(T)
Validates a value before it is synchronized.
bool IsValid(T value)
Parameters
valueTThe value to validate.
Returns
- bool
True if the value is valid, false otherwise.