-
Notifications
You must be signed in to change notification settings - Fork 1
Serialization
Mishin870 edited this page Jul 27, 2018
·
5 revisions
You can serialize compiled script to increase loading speed (run it without syntax processing)
//The last argument specifies whether serialization should be optimized for the client part (c++)
script.serialize(Engine, Stream, false);
Script script = engine.loadScript(Stream);
using (FileStream stream = new FileStream("test.script", FileMode.Create, FileAccess.Write)) {
script.serialize(stream);
}
using (FileStream stream = new FileStream("test.script", FileMode.Open, FileAccess.Read)) {
script = engine.loadScript(stream);
}