internal LiteNetLibFunction ProcessNetFunction(LiteNetLibFunction netFunction, NetDataReader reader, bool hookCallback)
 {
     if (netFunction == null)
     {
         return(null);
     }
     netFunction.DeserializeParameters(reader);
     if (hookCallback)
     {
         netFunction.HookCallback();
     }
     return(netFunction);
 }
Esempio n. 2
0
        internal LiteNetLibFunction ProcessNetFunction(LiteNetLibElementInfo info, NetDataReader reader, bool hookCallback)
        {
            LiteNetLibFunction netFunction = GetNetFunction(info);

            if (netFunction == null)
            {
                if (Manager.LogError)
                {
                    Debug.LogError("[" + name + "] [" + TypeName + "] cannot process net function, functionId [" + info.elementId + "] not found.");
                }
                return(null);
            }
            netFunction.DeserializeParameters(reader);
            if (hookCallback)
            {
                netFunction.HookCallback();
            }
            return(netFunction);
        }