mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-23 08:53:05 +08:00
30 lines
751 B
C#
30 lines
751 B
C#
using System;
|
|
using Mono.CSharp;
|
|
using UnityExplorer.Helpers;
|
|
#if CPP
|
|
using UnhollowerBaseLib;
|
|
using UnhollowerRuntimeLib;
|
|
#endif
|
|
|
|
namespace UnityExplorer.Unstrip
|
|
{
|
|
public class ResourcesUnstrip
|
|
{
|
|
public static UnityEngine.Object[] FindObjectsOfTypeAll(Type type)
|
|
{
|
|
#if MONO
|
|
return UnityEngine.Resources.FindObjectsOfTypeAll(type);
|
|
#else
|
|
var iCall = ICallHelper.GetICall<d_FindObjectsOfTypeAll>("UnityEngine.Resources::FindObjectsOfTypeAll");
|
|
var cppType = Il2CppType.From(type);
|
|
|
|
return new Il2CppReferenceArray<UnityEngine.Object>(iCall.Invoke(cppType.Pointer));
|
|
#endif
|
|
}
|
|
|
|
#if CPP
|
|
internal delegate IntPtr d_FindObjectsOfTypeAll(IntPtr type);
|
|
#endif
|
|
}
|
|
}
|