Programming Study Group - / discord
This video shows examples of calling external code from Unity via a DLL. I'll show you how to include and call functions in Java, C++, Lua, TypeScript, and Python. Without further ado, I'll provide working examples and explanations of structure, DllImport, and execution. We'll also cover the Plugins folder.
Including a DLL in Unity
Calling functions from C++, Java, Python, and other languages
DllImport examples and project structure
Running on different platforms
My second gaming channel - / @rdgames-j7s
Running Third-Party Languages in Unity (Plugins & Native Code)
In this episode, we'll explore how and why to use non-C# code in Unity. We'll discuss the role of the Plugins folder in detail and test the integration of various programming languages in practice.
Video highlights:
Why is this necessary? [00:07] Using native plugins for analytics, databases, and third-party services. Creating a single game core in C++ for porting between different engines (Unity, Unreal Engine, Godot).
Plugins folder: [02:06] Understanding the purpose of this folder. You'll learn that it's not strictly required [02:23], but it helps Unity automatically configure library imports for specific platforms and architectures [04:11].
C# DLL Integration: [04:14] How to compile your C# library and include it in your project.
C++ in Unity: [06:03] Why C++ is the perfect choice for a cross-platform core. Understanding DllImport [07:25] and writing C-style wrappers for proper operation [08:05].
Java and Android: [10:24] The nuances of running Java code. Running through the JVM on Windows and native use on Android [10:40].
Lua for game logic: [13:00] How to integrate Lua with CMake and set up two-way communication between C# and Lua scripts [15:05].
Python in Unity: [17:05] Embedding Python (Embeddable Package) directly into a game [18:24], setting up paths and calling methods from .py files [20:12].
TypeScript / JavaScript: [20:55] A review of the Puerts tool (from Tencent) for running TypeScript. Why it might be more convenient than C++ for gameplay logic [21:40].
Who this video is for:
Developers who want to optimize their work, use existing libraries in other languages, or plan to release a game on multiple engines simultaneously.
In questa pagina del sito puoi guardare il video online Unity - Run Java, C++, Lua, TypeScript, Python in Unity - 37 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato RDragon 24 agosto 2025, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 267 volte e gli è piaciuto 19 spettatori. Buona visione!