using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public class TestTTTT : EditorWindow
{
static Dictionary<int, List<GameObject>> layerDic = new Dictionary<int, List<GameObject>>();
static string findTag = "m_Layer"; // 需要查询的标签
[MenuItem("TestTTTT/查找引用者 #&R", false, 10)]
public static void ShowWindow()
{
GetWindow<TestTTTT>("查找引用者").Show();
}
private void OnGUI()
{
if (GUILayout.Button("Spawn"))
{
Find();
}
}
static private void Find()
{
string[] paths = AssetDatabase.GetAllAssetPaths();
//加载所有prefab资源
var gos = paths.Where(path => path.EndsWith("prefab")).Select(path => AssetDatabase.LoadAssetAtPath<GameObject>(path));
var sum &#
Unity编辑模式下找prefab内的标签
于 2022-02-11 16:56:39 首次发布