コード例 #1
0
ファイル: NativeInterface.cs プロジェクト: xfilson/dn_asset
    static void OnInitCallback(byte t, IntPtr ptr)
    {
        string command = Marshal.PtrToStringAnsi(ptr);

        switch (t)
        {
        case ASCII.L:
            XDebug.CLog(command);
            break;

        case ASCII.W:
            XDebug.CWarn(command);
            break;

        case ASCII.E:
            XDebug.CError(command);
            break;

        case ASCII.G:
            GameObject go = XResources.Load <GameObject>(command, AssetType.Prefab);
            go.name = command;
            break;

        case ASCII.U:
            XDebug.CLog("unload: " + command);
            break;

        default:
            XDebug.LogError(t + " is not parse symbol: " + command);
            break;
        }
    }