GodotTool 1.0.5
dotnet tool install --global GodotTool --version 1.0.5
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local GodotTool --version 1.0.5
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GodotTool&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package GodotTool --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GodotTool
Tool for Godot game developers.
Install
dotnet tool install --global GodotTool --version 1.0.5
Usage
Description:
Usage:
GodotTool [command] [options]
Options:
--version Show version information
-?, -h, --help Show help and usage information
Commands:
nodes <filepaths> Generates partial class with all nodes for the given *.tscn file with existing associated script. []
Features
Generate Nodes
Generates strongly typed properties for every node in the given *.tscn file.
Generates file with the following attributes:
- Name
[AssociatedScriptName].Nodes.cs
- Ex. for
Main.tscn
withMain.cs
the generated file will be namedMain.Nodes.cs
- Ex. for
Usings
- Adds
Godot
using - Adds all necessary usings gathered from all dependant scripts
- Adds
Namespace
that correspondents with the namespace found in the associated scriptPartial class
for the associated script (class) with:Properies
for every found nodes in the source *.tscn file- Public
Initialize()
method that should be call from_Ready()
method in the main class- Contains
Initializations
for all nodes found
- Contains
Command: nodes
Arguments: list of strings
that are file paths of *.tscn files or nothing
to go through all *.tscn files in project
Examples:
godottool nodes
godottool nodes .\Main.tscn
godottool nodes .\Main.tscn .\Components\Component.tscn
Generated partial class format:
using Godot;
//
// GENERATES: dependency usings
//
namespace MyProject;
public partial class Main
{
//
// GENERATES: node properties
//
// Format:
//
// public [NodeType] [NodeName] { get; set; }
//
public Node MyNode { get; set;}
public void Initialize()
{
//
// GENERATES: node initializations
//
// Format:
//
// [NodeName] = GetNode<[NodeType]>("[NodePath]");
//
MyNode = GetNode<Node>("./MyNode");
}
}
Notes:
- In the case of file scoped namespace it will generate *.Nodes.cs file also with file scoped namespace
- In the case of block scoped namespace it will generate *.Nodes.cs file also with block scoped namespace
- If the source class is not
partial
(in the case of Godot 3.5.x) the keyword will be added
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.