You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
799 B
24 lines
799 B
5 months ago
|
using System;
|
||
|
using System.Linq;
|
||
|
using Sirenix.OdinInspector;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class Test : MonoBehaviour
|
||
|
{
|
||
|
[Button]
|
||
|
private void TestButton()
|
||
|
{
|
||
|
var a = AppDomain.CurrentDomain.GetAssemblies()
|
||
|
.Where(a => a.GetName().Name
|
||
|
// is "UnityEngine"
|
||
|
is "Assembly-CSharp")
|
||
|
// or "Assembly-CSharp-firstpass"
|
||
|
// or "Assembly-CSharp-Editor"
|
||
|
// or "Assembly-CSharp-Editor-firstpass")
|
||
|
.SelectMany(a => a.GetTypes())
|
||
|
.Where(t => (t.IsClass || (t.IsValueType && !t.IsPrimitive && !t.IsEnum)) && string.Equals(t.Namespace, "Tools.ExcelResolver", StringComparison.Ordinal)) // IsPrimitive为基本类型如float,int等
|
||
|
.ToArray();
|
||
|
Debug.Log(a.Length);
|
||
|
}
|
||
|
}
|