Skip to content

GlobalClassAttribute in C# #8608

Open
Open
@iRumba

Description

@iRumba

Your Godot version:
4.2 Stable Mono

Issue description:
GlobalClassAttribute works only for scripts in res:// scope.

I have project scructure like this

  • src
    -- /GodotExtensions
    --- /GodotExtensions.csproj (Sdk="Godot.NET.Sdk/4.2.0")
    --- /MyNode.cs (extends Node / [GlobalClass])
    -- /GodotProject
    --- /project.godot
    --- /GodotProject.sln
    --- /GodotProject.csprog

MyNode not viewed in add node menu

It also means that I can't provide global classes through Nuget repository.

This limits CS development functionality.

Perhaps there are other restrictions related to the incompatibility of the Godot and Dotnet project structures.

I think this should be documented.

URL to the documentation page:
https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/c_sharp_global_classes.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationenhancementtopic:dotnet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions