This file contains 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
public static List<GameObject> LoadDirectoryPrefab(string rootPath) | |
{ | |
var dictoryInfo = new DirectoryInfo(rootPath); | |
if (!dictoryInfo.Exists) return null; | |
var ret = new List<GameObject>(); | |
FileInfo[] fileInfos = dictoryInfo.GetFiles("*.prefab", SearchOption.AllDirectories); | |
EditorUtility.DisplayProgressBar("加载Prefab中...", "开始加载", 0f); |
This file contains 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.IO; | |
using System.Reflection; | |
using UnityEngine; | |
using UnityEditor; | |
using Object = UnityEngine.Object; | |
public class UIScriptRefChecker : EditorWindow | |
{ |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
public class ReferenceFinder : EditorWindow | |
{ | |
public static ReferenceFinder Instance; | |
public Dictionary<string, BetterList<string>> dict; | |
private Vector2 _scroll = Vector2.zero; |
This file contains 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.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UI; | |
/// <summary> | |
/// Prefab 中文本扫描替换 | |
/// </summary> |
This file contains 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
#!/usr/bin/env python3 | |
from random import * | |
DIR = [(-1, 0), (0, -1), (1, 0), (0, 1)] | |
def R(arr, x, y, n = 1): | |
global DIR | |
ret = 0 | |
for t in range(1, n + 1): |
This file contains 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
#pragma once | |
#include <string> | |
namespace util | |
{ | |
class FileUtil | |
{ | |
public: | |
static bool read_file(const char* file_path, std::string &result) |
This file contains 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
public static class GameObjectUtil | |
{ | |
#if UNITY_EDITOR | |
public static GameObject FindGameObject(this GameObject obj, string name, bool includeInactive = true, bool showError = true) | |
{ | |
Transform[] trs = obj.GetComponentsInChildren<Transform>(true); | |
foreach (Transform t in trs) | |
{ |
This file contains 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
{ | |
// 使用 IntelliSense 了解相关属性。 | |
// 悬停以查看现有属性的描述。 | |
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Unity Editor", | |
"type": "unity", |
This file contains 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.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class TextContentMatchUtil : EditorWindow | |
{ | |
[MenuItem("Tools/Text组件内容匹配")] |
This file contains 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 UnityEngine; | |
using System; | |
public class DebugUtil | |
{ | |
public enum Level | |
{ | |
Log = 0, | |
Warning, | |
Error, |