features | C#Light | C#LikeFree | C#Like |
delegate | support | support | support |
lambda | support | support | support |
object-oriented | interface inherit | adds support partial | adds support constructor(support this/base);destructor;class inherit;virtual function |
math expression | + - * / % += -= *= /= %= > >= < <= != == && || ! ++ --(support i++ but not support ++i) ?: is as | adds full support '++ --' | adds bit operation '& | ~ ^ &= |= ^= << >> <<= >>=' |
keyword | this | this typeof | this base sizeof typeof unsafe $ @ #pragma #warning #error |
namespaceusing | Not support namespace.You must register the type in not hot update script before use it in hot update script. | Support namespace,Don't need to register the type in not hot update script before use it in hot update script,and 'using alias/command/static'. | adds 'using sentence' |
exception | throw | same with C#Light | adds try-catch-finally |
type | var void bool float double char string byte sbyte int uint short ushort long ulong null | same with C#Light | Adds support Nullable type and Nullable math expression and coalescing operator '?.' and '??'. |
get/set Accessor | Only support automatic implement get/set accessor | same with C#Light | Adds custom implement get set accessor |
loop | for foreach continue break if-else return while do-while | same with C#Light | Adds switch-case-default |
debug | Can print error sentence | In debug mode, you can use breakpoint and step-in to debug your code by VisualStudio. In hot update mode,you can get the stack information (include file name,class name, function name,which line) while got error. | same with C#LikeFree, but greatly reduces the difference between debug mode and hot update mode because support more C# features |
compile script | It may take several seconds or even more than ten seconds to compile at runtime, depending on the amount of your code, even if it has been Precompiled into token. | All compilation processes are completed in the editor and saved as binary file. The loading time at runtime is almost negligible. Although the compilation time is basically the same (it even takes more time to build cached data), The loading time gives user an excellent experience. | same with C#LikeFree |
MonoBehaviour | not support | You can write your hot update script just same with in normal script. You can regard LikeBehaviour as MonoBehaviour in hot update script. | adds support the coroutine. |
multi-threading | not support | support | adds lock syntax |
code annotation | // | same with C#Light | // and /**/ |
macro and region | not support | same with C#Light | #if #elif #else #endif #region #endregion |
enum | not support | same with C#Light | support |
parameter modifier | not support | same with C#Light | support 'ref out in params' |
function overloading | not support | same with C#Light | support |
default parameters | not support | same with C#Light | support |
CSV | not support | KissCSV | same with C#LikeFree |
JSON | not support | KissJSON | same with C#LikeFree |
Socket/WebSocket | not support | KissServerFramework is easy use in hot update script, corresponding C# server. This is a most simple and stupid IOCP server framework component include WebSocket/Socket/HTTP/MySQL. All your logic work in A single main thread, you don't need to worry about multi-threading problem. All the heavy work process by framework in background threads. Easy to use database even never hear about SQL. You won't use the SQL knowledge, just need define the struct of database table, and then can use that data and it will automatically synchronize data with client and database. | same with C#LikeFree |
normal Unity code | C#Like hot update code |
We define a simple class, inherit MonoBehaviour, call some Unity periodic functions which most commonly used | Here are the same with the left side normal code, but using the hot update script.You can check it out the difference. |
setting prefab in unity editor | interactiv in hot update script |
As shown below, show how to get/set value and component which binding in prefab.
BindHotUpdateClassFullName is the full name of the class with Namespace.
![]() |
As shown below, it's the binding hot update script. |
C#Light | C#Like |
You must register the type in not hot update script before use it in hot update script. | Just direct use in hot update script,no need register |
Type Stripping | Generic type |
IL2CPP will strip the engine code if they are not be use. Unfortunately, our hot update script happens to be the strip one. You must set 'Managed Stripping Level' to 'Low' or 'Medium' (can't set to 'High'). Check which *.dll that you'll be use in the future in the folder '{Unity install folder}\Editor\Data\Managed\UnityEngine\'. And then the modify 'Assets\C#Like\link.xml', make sure your type wont be stripping by IL2CPP. | Because you can't JIT the generic type in IL2CPP,and must AOT. All the generic type must be used once in not hot update script before use in hot update script. We will automatic generate 'Assets\C#Like\Runtime\AheadOfTime\AheadOfTime.cs' while compile script. Theoretically all your generic types almost be generated when you finally release your product. Here is the file automatic generate in sample. Don't modify this file manually. |
File tree framework Usage guide for the whole framework(C#Lkie+KissServerFramework). If you just care about C#Lkie, you can just need to read step 6. |
Can use both in normal script and hot update script, you can easy convert between JSON string and class/struct(include hot update script and normal script), and the JSONData is supper easy to use. |
class feature | class feature |
Here are a interface IAnimal, and then abstract base class Animal inherit IAnimal, and then a normal class Mammals inherit Animal,finally a normal class Human inherit Mammals. This sample show the class feature. |
Delegate and Lambda |
We have 3 buttons('Test Delegate','Test Lambda','Test Bind') and a Text component in the interface. |
Math Expression |
loop syntax |
custom get/set accessor |
multi-threading |
macro and region |
enum |
parameter modifier |
default parameters and function overloading |
keyword |