Unity + Lua script is now most popular Incremental Update FrameWork For Mobile Game In China,But Because that not has a easy-to-use profiler cause more cpu usage to lua gc and also more memory usage. so much so that programmers don't know how to optimize their game.then they replace lua code with C# to find the problems,but also more buildin code and less flexibility in operation activity
so this tool is design to support a easy-to-use profiler for unity that help finding battleneck and make your game more fast and stable.
If you want to test this project,use administrator mode to run the link.bat
If you find any bug or have any suggest join the qq group:882425563 to contact us
This tool now support XLua、SLua、ToLua.This is a remote profiler tool so it support Windows、Android、IOS On-device Profiler。
- Open LuaProfiler folder
- Copy LuaProfilerClient folder to you game project content,if your C# Lua script is in Plugins folder,Copy LuaProfilerClient to Plugins.This Tool must make sure That Code must in the same DLL which has C# Lua Scirpt.
- Use Unity5.6 or newer unity version to create a project, Copy LuaProfilerServer To the project content
It use mono.ceil's IL Inject feature(also use in XLua),Inject The profiler Code to Game Code
Open windows by "Window->Lua Profiler Window", toggle profiler's feature and configure the server ip address.
Also Open windows by "Window->Lua Profiler Window", then OpenService,wait for client connects
Click Record button, when Game connect to server, Toggle StartRecord To Start Or Stop Record.
- drag slider to modify samples
- click '<' 、 '>' to increase or discrease frames one by one
- click '<<' 、 '>>' to fast locate the frames control by Capture Lua GC、Capture Mono GC、Frame Count
Set Macro USE_LUA_PROFILER to Inject Profiler code in you App.if you want to use luac code or luajit bytecode ,Use InjectLua.exe in folder Tools To Inject the lua profiler code.
InjectLua.exe "inpath" "outpath"
easy66
Xavier
Jay
ZhangDi
and all members in qq group LuaProfiler