Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create new C# scripts with proper namespace?

Tags:

c#

godot

I'm using the C# Mono version for Godot and would like to know if it is possible to configure Godot to make use of namespaces. When creating a new script at

./Folder/MyClass.cs

I would expect the namespace to be

MyProject.Folder

So the created file should be similiar to

using Godot;

namespace MyProject.Folder
{
    public class MyClass : Node2D { }
}

Is that possible?

like image 819
Question3r Avatar asked Sep 17 '25 07:09

Question3r


1 Answers

I don't think it is possible to configure Godot to do this. To be clear, it is possible to create custom templates for scripts, see Creating script templates. However, as far as I can tell Godot does not offer a way to use the folder path (or its parts) in a template.

like image 121
Theraot Avatar answered Sep 19 '25 19:09

Theraot