guanghuispark
4 年前
当前提交
2055e29d
共有 3 个文件被更改,包括 52 次插入 和 12 次删除
-
42Samples/UIWidgetsSamples_2019_4/Assets/UIWidgetsExample.cs
-
3engine/src/shell/platform/unity/uiwidgets_panel.cc
-
19engine/src/shell/platform/unity/uiwidgets_log.h
|
|||
#include "runtime/mono_api.h" |
|||
|
|||
namespace uiwidgets { |
|||
//use UnityLog just like printf, and this will output the result to unity |
|||
#define UnityLog(...) {char log_str[512] = { 0 }; sprintf_s(log_str, __VA_ARGS__); Debug::Log(log_str, strlen(log_str));} |
|||
extern "C" |
|||
{ |
|||
class Debug |
|||
{ |
|||
public: |
|||
static void (*Log)(char* message,int iSize); |
|||
}; |
|||
|
|||
void (*Debug::Log)(char* message, int iSize); |
|||
// export c++ function interface for c# |
|||
UIWIDGETS_API(void) InitCSharpDelegate(void (*Log)(char* message, int iSize)){Debug::Log = Log;} |
|||
} |
|||
|
|||
} // namespace uiwidgets |
撰写
预览
正在加载...
取消
保存
Reference in new issue