This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import json | |
| import sys | |
| from datetime import datetime | |
| def parse_simpleperf_line(line): | |
| """解析simpleperf报告中的单行数据""" | |
| # 解析样本行 | |
| sample_pattern = re.compile( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 反射工具 | |
| class FReflectionHelper | |
| { | |
| public: | |
| template <typename T> | |
| static T GetDefault() | |
| { | |
| static T t; | |
| return t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local function test3_newindex2() | |
| print("------- test3_newindex2 -------") | |
| local t = {} | |
| local _t_store = {} | |
| local mt = { | |
| __index = function (t, k) | |
| print("*access to element " .. tostring(k)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| [RequireComponent(typeof(SkinnedMeshRenderer))] | |
| public class MonoTestMaterialPropertyBlock : MonoBehaviour | |
| { | |
| public bool UseMPB; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace test_boxing | |
| { | |
| class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (GUILayout.Button("检查重复依赖")) | |
| { | |
| // 如果某个资源即在ab1中,又在ab2中,就是重复依赖了 | |
| var self = target as CheckDuplicatedDeps; | |
| var abMapping = new Dictionary<string, HashSet<string>>(); | |
| System.Action<string, string> addMaping = (string a, string b) => | |
| { | |
| if (!abMapping.ContainsKey(a)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "ThreadFactory.h" | |
| #if WITH_EDITOR | |
| #include "Editor.h" | |
| #endif | |
| FThreadFactory* FThreadFactory::Inst = NULL; | |
| FThreadFactory& FThreadFactory::Singleton() | |
| { | |
| if (Inst == NULL) |