mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-23 00:52:31 +08:00
25 lines
602 B
C#
25 lines
602 B
C#
using System;
|
|
using UnityExplorer.Helpers;
|
|
using UnityEngine;
|
|
#if CPP
|
|
using UnhollowerBaseLib;
|
|
#endif
|
|
|
|
namespace UnityExplorer.Unstrip
|
|
{
|
|
public static class LayerMaskUnstrip
|
|
{
|
|
#if CPP
|
|
internal delegate IntPtr d_LayerToName(int layer);
|
|
|
|
public static string LayerToName(int layer)
|
|
{
|
|
var iCall = ICallHelper.GetICall<d_LayerToName>("UnityEngine.LayerMask::LayerToName");
|
|
return IL2CPP.Il2CppStringToManaged(iCall.Invoke(layer));
|
|
}
|
|
#else
|
|
public static string LayerToName(int layer) => LayerMask.LayerToName(layer);
|
|
#endif
|
|
}
|
|
}
|