Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GD0002: GodotObject에서 파생된 중첩 클래스를 포함하는 유형 선언에 부분 수정자가 누락되었습니다.
규칙 ID |
GD0002 |
카테고리 |
사용례 |
수정 내용이 중단되거나 중단되지 않음 |
굽기 |
기본적으로 활성화됨 |
es |
원인
``GodotObject``에서 파생된 유형은 부분이 아닌 유형 선언에 포함되어 있습니다.
설명
Godot 소스 생성기는 생성된 코드를 사용자 정의 유형에 추가하여 엔진과의 통합을 구현합니다. 소스 생성기는 부분적으로 선언되지 않은 유형에 생성된 코드를 추가할 수 없습니다.
public class InvalidParentType
{
// MyNode is contained in a non-partial type so the source generators
// can't enhance this type to work with Godot.
public partial class MyNode : Node { }
}
public partial class ValidParentType
{
// MyNode is contained in a partial type so the source generators
// can enhance this type to work with Godot.
public partial class MyNode : Node { }
}
독립적으로 존재해야 하는 것
이 규칙 위반 문제를 해결하려면 유형 선언에 partial 키워드를 추가하세요.
경고를 억제해야 하는 경우
이 규칙에서 경고를 표시하지 마세요. ``GodotObject``에서 파생되었지만 부분적이지 않은 유형은 소스 생성기로 향상될 수 없으므로 예기치 않은 런타임 오류가 발생합니다.