First of all, if any of the small partners feel unfamiliar, you can read this blog in front of the two blog, which tells the tall Jsb,unity hot update program, with the powerful universe first editor vs to develop Unity Thermal update script, update C # is not a dream
This demo project I have the long ball, the address here Http://pan.baidu.com/s/1qWQlXUW; after downloading (put on D plate on D plate on D disk!!!!) The Unity project inside opens and runs the main scene. will appear, the only meaning of this blog is the demo, the actual combat is not to tell you nonsense, do not talk about theory, directly to the version can be run
Why Hot update protobuff?
Cause: Can be installed in front of the server to say, you change the network protocol without changing the game bag ~~! You are ugly, you have to change an agreement to stop the service .....
What do you do?
How to do, this problem, I still strongly suggest to Baidu cloud disk download Demo project, point Open on the direct operation, I will strictly follow the demo here
Step 1: Establish a thermal update project, how to create a small partner, you can see the previous article, created well after. Then put the script I wrote
Step 2: Execute the script in the Unity project to write the experiment
The above code means to execute
This function, is not very simple??
, the core of this set of things used Https://github.com/dcodeIO/ProtoBuf.js, and then introduced with includes JS.
Then wrap it in C # with PROTOBUFFERWRAP CS for use in C # upper layer
Precautions
1,js inside the number and C # inside the long is not equal, which is caused by the language, not the protobuff problem. Protobuf.js itself has done the processing, the definition of JS long in long_min inside
2,decode out of the object after the cast, there is no function, in the entire JSB system only new objects will have function
Finally welcome to JSB QQ Group: 189738580, we wait for you
Unity Hot Update C # Real-combat experience Sharing (ii)-Dynamic Protobuff protocol, no more worrying about changing packets for a change of protocol ~~!