C++ Rendering Plugin example for Unity
This sample demonstrates how to render and do other graphics related things from a C++ plugin, via a native plugin interface.
Unity versions:
The plugin itself does very few things:
Native code rendering is implemented for several platforms and graphics APIs:
#define SUPPORT_VULKAN 0
to 1 under UNITY_WIN clause in PlatformBase.h#define SUPPORT_D3D12 0 to 1 under UNITY_WIN clause in PlatformBase.hCode is organized as follows:
PluginSource is source code & IDE project files for the C++ plugin.source: The source code itself. RenderingPlugin.cpp is the main logic, RenderAPI*.* files contain rendering implementations for different APIs.projects/VisualStudio2022: Visual Studio 2022 project files for regular Windows pluginprojects/UWPVisualStudio2022: Visual Studio 2022 project files for Windows Store (UWP) pluginprojects/Xcode: Apple Xcode project file for Mac OS X plugin, Xcode 10.3 on macOS 10.14 was testedprojects/GNUMake: Makefile for Linuxprojects/EmbeddedLinux: Windows .bat files to build plugins for different architecturesprojects/QNX: Makefile for Linux requires QNX to be installed and environment variables to be setUnityProject is the Unity (2023.1.15f1 was tested) project.scene that contains the plugin sample scene.Just like with most other samples, the license is MIT/X11.
No open issues yet, or sync has not completed.