diff --git a/csharp-api/REFrameworkNET/API.hpp b/csharp-api/REFrameworkNET/API.hpp index 40626e937..af99b41b3 100644 --- a/csharp-api/REFrameworkNET/API.hpp +++ b/csharp-api/REFrameworkNET/API.hpp @@ -105,6 +105,18 @@ public ref class API return gcnew NativeObject(result, t); } + generic + static T GetNativeSingletonT() { + auto fullName = T::typeid->FullName; + return GetNativeSingleton(fullName)->As(); + } + + generic + static T GetManagedSingletonT() { + auto fullName = T::typeid->FullName; + return GetManagedSingleton(fullName)->As(); + } + static reframework::API* GetNativeImplementation() { if (s_api == nullptr) { throw gcnew APINotInitializedException();