godotengine / godotengine/godot-docs

C#: Requirement of `partial` is not explained or documented

Open
#7,965 8 comments 0 reactions 0 assignees View on GitHub
bug topic:dotnet
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
v4.1.1.stable.mono.official [bd6af8e0e]
**Issue description:**
Currently, if `partial` is omitted from a Node-inherited class definition, it does emit the error `GD0001: Missing partial modifier on declaration of type 'PlayerControllerState' which is a subclass of 'Godot.GodotObject'`. However, nothing in the documentation explains why this is, or even alerts the user that `partial` is required when making a Node script. I ended up finding the reasoning in [a blog post](https://godotengine.org/article/whats-new-in-csharp-for-godot-4-0/#engine-interop-with-source-generators) that I only found through a link on [the (currently defunct) Godot ask site](https://ask.godotengine.org/148970/c%23-version-build-failed).
**URL to the documentation page:**
https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/c_sharp_basics.html
If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.