Getting Started
Installation
Download from the Asset Store.
Creating a C++ assembly asset
For CppInator to detect and compile your .cpp and .h files, you need to create a C++ Assembly asset. To do this, right-click in the Project window and select Create > CppAssembly Definition
. This will create a new C++ Assembly asset in your project.
This is similar to a C# Assembly Definition, but it is used to define a C++ assembly. Any .cpp or .h files that are in the same directory as the C++ Assembly asset will be compiled into a shared library and linked to your Unity project.
Creating a C++ script
To create a new C++ script, right-click in the Project window and select Create > C++ Source
or Create > C++ Header
. This will create a new .cpp or .h file in your project.
You can then edit the .cpp and .h files in your favorite text editor or IDE. When you save the files, CppInator will automatically detect the changes and recompile the shared library.
Visual Studio Code is a great choice for editing C++ files, as it has built-in support for C++ syntax highlighting and IntelliSense. CppInator also configures Visual Studio Code to use the correct include paths and compiler options for your project.
Forcing a recompile or a clean rebuild of the shared library
Building for different platforms
You can build for any platform that supports IL2CPP, including Windows, macOS, iOS, and Android.