This is an extension that adds support for creating lua modding or in game scripting in a sandboxed environment. We aim to provide API like the lua C API for GDScript.You can find full documentation and tutorials at: https://luaapi.weaselgames.info/latest/Importantly this is NOT meant to be a replacement for or alternative to GDScript. This extension provides no functionality to program your game out of the box.This is built for the godot 4.1-stable release. But should work with newer minor versions.Currently the LuaJIT version only supports Linux, Windows and MacOS
Quick Information
C# Coroutines like Unity
* Coroutines with pararmaters. * Yield until next frame. * Yield for certain amount of time in seconds. * Yield another coroutine.
Supported Engine Version
4.1
Version String
1
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL
GodotCoroutineslikeUnity
C# Coroutines in Godot game engine just like in Unity
Add PeakyCoroutine.cs somewhere in your project
Use like this...
public override void _Ready() { Coroutine.Run(TestCoroutine(3f), this); } IEnumerator TestCoroutine(float waittime) { GD.Print("Start " + Time.GetTicksMsec()); yield return new WaitForSeconds(1f); GD.Print("WaitedOneSecond " + Time.GetTicksMsec()); yield return new WaitForSeconds(1f); GD.Print("WaitedAnotherSecond " + Time.GetTicksMsec()); for (int i = 0; i < 20; i++) { yield return new WaitOneFrame(); GD.Print("Waited One frame " + Time.GetTicksMsec()); } yield return TestSubCoroutine(waittime); GD.Print("Final line from parent coroutine"); } IEnumerator TestSubCoroutine(float waittime) { GD.Print("start sub routine " + Time.GetTicksMsec()); yield return new WaitForSeconds(waittime); GD.Print("end sub routine " + Time.GetTicksMsec()); }
I wanted to replicate the following features..
- Coroutines with pararmaters.
- Yield until next frame.
- Yield for certain amount of time in seconds.
- Yield another coroutine.
* Coroutines with pararmaters. * Yield until next frame. * Yield for certain amount of time in seconds. * Yield another coroutine.
Reviews
0 total reviews
Quick Information
C# Coroutines like Unity
* Coroutines with pararmaters. * Yield until next frame. * Yield for certain amount of time in seconds. * Yield another coroutine.
Supported Engine Version
4.1
Version String
1
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL