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
This plugin provides an extension to Godot's functionality, emulating the @onready directive from GDScript within C# scripts.
CS_OnReady Plugin for Godot
This plugin provides an extension to Godot's functionality, emulating the @onready directive from GDScript within C# scripts.
Installation
- Clone this repository or download the ZIP.
- Copy the
cs_onready_pluginfolder into youraddonsdirectory in your Godot project. - Activate the plugin through the
Project>Project Settings>Pluginsmenu.
Usage
To use the plugin:
- Ensure the plugin is active.
- In your C# script, add the necessary
OnReadyCsnamespace at the top. - In your C# script, use the
[OnReady("Path/To/Your/Node")]attribute before any field you wish to initialize using the specified node. - In your script's
_Ready()method, callthis.InitializeOnReadyFields();.
Example:
First, add the necessary using directive:
using Godot;
using OnReadyNameSpace;
Then, in your script:
[OnReady("Path/To/SomeNode")]
private SomeNodeType myNode;
public override void _Ready()
{
this.InitializeOnReadyFields();
// Now, myNode is initialized and ready to use.
}
Contributing
- Fork the repository on GitHub.
- Clone the forked repository to your local machine.
- Commit your changes to your fork.
- Push your work back up to your fork on GitHub.
- Submit a Pull request so that we can review your changes.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
This plugin provides an extension to Godot's functionality, emulating the @onready directive from GDScript within C# scripts.
Reviews
Quick Information
This plugin provides an extension to Godot's functionality, emulating the @onready directive from GDScript within C# scripts.