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...
GD0003: 동일한 스크립트 파일에서 동일한 이름을 가진 여러 클래스가 발견되었습니다.
규칙 ID |
GD0003 |
카테고리 |
사용례 |
수정 내용이 중단되거나 중단되지 않음 |
굽기 |
기본적으로 활성화됨 |
es |
원인
스크립트 파일에는 GodotObject 파일과 일치하는 이름을 가진 ``GodotObject``에서 파생되는 여러 유형이 포함되어 있습니다. 스크립트 파일에서 한 가지 유형만 파일 이름과 일치해야 합니다.
설명
Godot는 스크립트가 고유한 경로를 갖도록 요구하므로 모든 유형은 자체 파일에 정의되어야 하며 유형 이름은 파일 이름과 일치해야 합니다.
public partial class MyNode : Node { }
namespace DifferentNamespace
{
// Invalid because there's already a type with the name MyNode in this file.
public partial class MyNode : Node { }
}
// Invalid because there's already a type with the name MyNode in this file.
public partial class MyNode<T> : Node { }
독립적으로 존재해야 하는 것
이 규칙 위반을 수정하려면 각 유형 선언을 다른 파일로 이동하세요.
경고를 억제해야 하는 경우
이 규칙에서 경고를 표시하지 마세요. ``GodotObject``에서 파생되는 유형에는 고유한 경로가 있어야 합니다. 그렇지 않으면 엔진이 경로별로 스크립트를 로드할 수 없으므로 예기치 않은 런타임 오류가 발생합니다.