initial commit

This commit is contained in:
Jo 2025-01-07 02:06:59 +01:00
parent 6715289efe
commit 788c3389af
37645 changed files with 2526849 additions and 80 deletions

View file

@ -0,0 +1,21 @@
{
"name": "OverloadedFunctionPointers",
"rootNamespace": "",
"references": [
"Unity.Burst"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"optionalUnityReferences": [
"TestAssemblies"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [],
"noEngineReferences": false
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ee94adce07250884391eeae8a50c225e
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,17 @@
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
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66ab7ac009493f37ae82d74f0f5f952e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: