From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Misc/Plugins.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Runtime/Misc/Plugins.h (limited to 'Runtime/Misc/Plugins.h') diff --git a/Runtime/Misc/Plugins.h b/Runtime/Misc/Plugins.h new file mode 100644 index 0000000..1230835 --- /dev/null +++ b/Runtime/Misc/Plugins.h @@ -0,0 +1,25 @@ +#pragma once + +#include "Runtime/GfxDevice/GfxDevice.h" + +void SetAllowPlugins (bool allow); + +// Never change the enum values! +// They are used in low level native plugin interface. +enum GfxDeviceEventType { + kGfxDeviceEventInitialize = 0, + kGfxDeviceEventShutdown = 1, + kGfxDeviceEventBeforeReset = 2, + kGfxDeviceEventAfterReset = 3, +}; + +#if UNITY_PLUGINS_AVAILABLE +const char* FindAndLoadUnityPlugin (const char* pluginName); +// Used by GfxDevice +void PluginsSetGraphicsDevice (void* device, int deviceType, GfxDeviceEventType eventType); +void PluginsRenderMarker (int marker); +void UnloadAllPlugins (); +#else +inline void PluginsSetGraphicsDevice (void* device, int deviceType, GfxDeviceEventType eventType) { } +inline void PluginsRenderMarker (int marker) { } +#endif -- cgit v1.1-26-g67d0