Commit Graph

12 Commits

Author SHA1 Message Date
Paul Pacheco
d9418b1c84 Simplify OnSerialize generation
* Simplify generated serializer
* Add some comments to better understand what the weaver is generating
2018-07-27 16:22:43 +02:00
vis2k
2b54665915 Weaver SyncEvent code doesn't manually construct the message anymore. The NetworkWriter is now passed to NetworkBehaviour.SendEventInternal, where the message is properly constructed. Reduces dependencies on NetworkConnection.SendBytes and avoids expensive GetComponent calls that the Weaver previously generated. 2018-07-26 20:09:51 +02:00
vis2k
83927f27b0 Weaver TargetRpc code doesn't manually construct the message anymore. The NetworkWriter is now passed to NetworkBehaviour.SendTargetRPCInternal, where the message is properly constructed. Reduces dependencies on NetworkConnection.SendBytes and avoids expensive GetComponent calls that the Weaver previously generated. 2018-07-26 19:33:38 +02:00
vis2k
1097d000ff Weaver Rpc code doesn't manually construct the message anymore. The NetworkWriter is now passed to NetworkBehaviour.SendRPCInternal, where the message is properly constructed. Reduces dependencies on NetworkConnection.SendBytes and avoids expensive GetComponent calls that the Weaver previously generated. 2018-07-26 19:15:42 +02:00
vis2k
75351927c1 Weaver Command code doesn't manually construct the message anymore. The NetworkWriter is now passed to NetworkBehaviour.SendCommandInternal, where the message is properly constructed. Reduces depencies on NetworkConnection.SendBytes and avoids expensive GetComponent calls that the Weaver previously generated. 2018-07-26 14:19:29 +02:00
vis2k
2148351799 UNetBehaviourProcessor WriteMessage comments added to make this more obvious in the future. 2018-07-26 12:51:36 +02:00
vis2k
4b339931c5 UNetBehaviourProcessor: WriteCreateWriter Ldloc_0 call moved to WriteMessageSize. All kinds of WriteMessageX functions always load the writer, push the variable on the stack and then write it. Except WriteCreateWriter which didn't load the writer, they decided to do this in WriteCreateWriter right after it was created. This was terrible code because removing WriteMessageSize calls anywhere would break all following calls, since WriteCreateWriter already called Ldloc_0 and the next call like WriteMessageId would call Ldloc_0 again. 2018-07-26 12:36:44 +02:00
vis2k
ffa6e4e2ea NetworkCRC removed because all it did was compare each script's channelIds by sending all the script names over the network. This uses unnecessary bandwidth, causes unnecessary code complexity and makes no real sense because there's virtually no reason why anyone would modify a script's channel after building the server/client. 2018-07-17 22:06:26 +02:00
Paul Pacheco
6b97f04960 Fixed debug build 2018-06-24 09:45:41 -05:00
vis2k
0a34efbaf4 NetworkReader/Writer use C#'s built in BinaryReader/Writer; removed NetworkBuffer; removed redundant .AsArray()/AsArraySegment() functions; removed unnecessary constructors 2018-06-22 09:32:19 +02:00
vis2k
a67508f624 [SyncVar] limit increased from 32 to 64 per component 2018-06-07 15:50:31 +02:00
vis2k
1e77e191b3 HLAPI 2017.4 (from https://bitbucket.org/Unity-Technologies/networking/src 2017.3, which is the same for 2017.4) 2018-06-07 15:41:08 +02:00