Files
UnityExplorer/src/Unstrip/ResourcesUnstrip.cs
sinaioutlander cfa4b12039 3.0.4
see release notes
2020-11-23 18:23:25 +11:00

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
}
}