# com.mars.lua2unityprofiler **Repository Path**: liangjx/com.mars.lua2unityprofiler ## Basic Information - **Project Name**: com.mars.lua2unityprofiler - **Description**: 一个简单的lua性能分析工具,可以把lua的函数耗时输出到unity profiler中 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-01 - **Last Updated**: 2025-09-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # com.mars.lua2unityprofiler #### 介绍 一个简单的lua性能分析工具,可以把lua的函数耗时输出到unity profiler中。 #### 效果展示 ![图片](Doc/Snipaste_2025-08-28_10-38-37.png) #### 主要的实现方式 使用debug.sethook在lua的每一个函数执行前后插入Profiler.BeginSample和Profiler.EndSample #### 其他说明 ![图片](Doc/EA608490-87AF-4264-AD82-12F41332CF11.png) 入口如图 入口的代码在Tool.cs中