Awesome
kotlin-unreal
kotlin-unreal: Use the amazing Kotlin language with UnrealEngine 4 and UnrealEngine 5
Uses Unreal.js wich is a Javascript runtime built for UE4 and UE5
Features
- Access to all Blueprint functions and classes
- A KotlinComponent attachable to an actor to control its behavior
- Interoperation between variables and functions defined at the Blueprint level
- Customizable Hot Reload: Apply code updates to everything or to the actors you're interested in, while in play mode.
Prerequisites
Unreal 4.26.1 - 4.27.2 or Unreal 5.0.0 - 5.0.1, but may work with other versions too.
Being able to build and run a Unreal C++ project and having all its dependencies installed.
IntelliJ IDEA Community: https://www.jetbrains.com/idea/download/
Installation
- Install Unreal.js plugin in your engine. The easiest way is finding it on the Unreal Marketplace: https://www.unrealengine.com/marketplace/en-US/product/unrealjs
If you can't find it in the Unreal Marketplace, you can install it manually following this instructions: https://github.com/ncsoft/Unreal.js/
-
Clone or download this repository.
Optionally change to a branch matching your engine version:
master branch will always be updated with the latest Unreal Engine version
Unreal Engine 5
Unreal Engine 4
-
You should be able to right click the file "KotlinUnreal.uproject" and select "Launch Game"
-
You might be asked to recompile or update the project to your engine version and after that you should be seeing the First Person Game example.
Check out the map examples
Open the project with the Unreal Editor and open and play the maps located on the Maps directory inside the Content folder. Some of them might look empty at first, but the Kotlin magic will fill them with surprises when you get into the Play mode.
WIKI
Check out the wiki for details, tutorials and guides:
https://github.com/hiperbou/kotlin-unreal/wiki
VIDEOS
Playlist on Youtube
https://youtube.com/playlist?list=PLJm5YzQnui1RfCue2NJtEKDSAJf-Kh0WG
Code examples
First Person Game example (watch on Youtube):
https://github.com/hiperbou/kotlin-unreal/blob/master/kotlin-examples/src/examples/game/Game.kt
Hello World example:
Rotating cubes example:
Adventure example (Kotlin Coroutines):
First Person example:
Third Person example:
Scene Lights example:
Hello Blueprints example:
Hello Blueprint example: