Firstborn/Library/PackageCache/com.unity.burst@1.8.4/Tests/OverloadedFunctionPointers/OverloadedFunctionPointers.cs
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

18 lines
477 B
C#

namespace OverloadedFunctionPointers
{
#if UNITY_2021_2_OR_NEWER && UNITY_EDITOR
public unsafe struct Callable
{
public int Value;
private Callable(int x)
{
Value = x;
}
public static Callable Create<T1, T2>(delegate* unmanaged[Cdecl] < T1, T2, void > function) => new Callable(2);
public static Callable Create<T1, TRet>(delegate* unmanaged[Cdecl] < T1, TRet > function) => new Callable(3);
}
#endif
}