finds.dev← search

// the find

jacksondunstan/UnityNativeScripting

★ 1,375 · C# · MIT · updated Mar 2021

Unity Scripting in C++

A code generator plus C++ binding layer that lets you write Unity game logic in C++ instead of C#, sidestepping IL2CPP's slow device builds and Unity's mandatory GC. It's aimed at mobile/console developers who are hitting real iteration-time or frame-hitch walls and are willing to trade C#'s safety net for raw build speed and manual memory control.

The core problem it solves is real: IL2CPP Android builds genuinely take 10+ minutes for a one-line change, and swapping in a prebuilt C++ plugin in ~1 second is a legitimate productivity win, not a marketing claim. The binding generator covers a surprisingly wide slice of C# semantics for a from-scratch tool — generics, operator overloading, out/ref params, exceptions crossing the C++/C# boundary, and C++ classes implementing C# interfaces or deriving from C# base classes, which is genuinely hard to get right. Hot-reloading the C++ plugin without restarting the game or losing editor state is a solid practical feature most native-interop projects skip. CMake as the build backbone means one config path covers Windows, macOS, Linux, iOS, and Android instead of five bespoke build scripts.

Last commit is from March 2021 — over five years stale as of now — and the README's own compatibility claim tops out at Unity 2017.x/5.x, so anything about current IL2CPP internals, newer scripting backends, or Unity 6 is unverified and likely broken. The README's own 'not yet supported' list is long and load-bearing: no string/array/object method binding, no nested types, no down-casting, no C# pointers, no varargs — meaning you will hit a wall on ordinary C# APIs, not just exotic ones. This is a single author's project built alongside his own blog series, with no evidence in the repo of use in a shipped commercial title, so there's no signal it's been battle-tested at scale. Adopting it means coupling your entire codebase to a code-generated binding layer pinned to specific IL2CPP internals of a five-year-old Unity version — if it breaks on a newer Unity release, there's no maintainer coming to fix it, only you.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →