/// <summary>
/// Create an instance NetRef
/// </summary>
/// <param name="getter">The getter function for the variable</param>
/// <param name="setter">The setter function for the variable</param>
/// <param name="callback">The optional callback to be executed when the replication has complete</param>
/// <param name="callbackCallers">The group of callers that will execute the callback method</param>
public NetRef(Func<T> getter, Action<T> setter, Action callback, NetworkCallers callbackCallers, bool ignoreInterpolation = false, bool serverOnly = false)
{
this.getter = getter;
this.setter = setter;
this.callback = callback;
this.IgnoreLerp = ignoreInterpolation;
this.callbackCallers = callbackCallers;
this.serverOnly = serverOnly;
this.IsNumber = BeardedMath.IsNumber(getter());
if (!this.IsNumber && !this.IgnoreLerp)
this.IgnoreLerp = true;
PreviousValue = getter();
}