CodeSmile

CodeSmile

Game Engineer and Code Composer since 1999

Luny Tanks – The Code Is Lua! :)

I ported Unity Learn’s Tanks! project to Luny. It’s a major milestone for Luny – the Lua solution for Unity. The Code Is Lua, Literally! You read that right: Lua, not lava! The demo runs Lua code!😀 In the browser!!😃…

Lua: Dot vs Colon Syntax Explained

In Lua both dot . and colon : separate identifiers. But when to use which? Dot Syntax Nothing out of the ordinary: In fact, besides the missing semicolon ; this would be legal C# code. Colon Syntax So why is…

Editor: Create LunyScript Assets

Use Case You need to create a LunyScript subclass with an associated Lua script. Create Asset Menu The Create Asset menu has been extended. Under the Scripting category you will find two new options: Choose Empty LunyScript to create a…

C#: Lua Value Property

Use Case Your C# LunyScript subclass needs to expose Lua script values to other C# scripts. Lua Implementation Your Lua script defines a script.currentHealth value that you wish to make available in C#: C# Implementation You can implement a C#…

C#: Assign Values To Lua Script

Use Case Your C# script needs to expose values to the Lua script before it even runs its Awake() function. C# Implementation The OnBeforeScriptAwake() method, when overridden in your LunyScript subclass, runs just before the script’s Awake() function. Use it…

Hello, Luny! Lua Scripting For Unity!

Luny is the first workable Lua scripting solution for Unity! Since early 2025 I have been busy doing the thing I’ve wanted to do for a decade but didn’t consider it viable: Lua scripting for Unity. 🤓 Not like existing…