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...
GD0104: 내보낸 속성은 쓰기 전용입니다.
규칙 ID |
GD0104 |
카테고리 |
사용례 |
수정 내용이 중단되거나 중단되지 않음 |
굽기 |
기본적으로 활성화됨 |
es |
원인
쓰기 전용 속성에는 [Export] 속성으로 주석이 추가됩니다. 쓰기 전용 속성은 내보낼 수 없습니다.
설명
Godot는 쓰기 전용 속성 내보내기를 허용하지 않습니다.
private int _backingField;
// Write-only properties can't be exported.
[Export]
public int InvalidProperty { set => _backingField = value; }
// This property can be exported because it has both a getter and a setter.
[Export]
public int ValidProperty { get; set; }
독립적으로 존재해야 하는 것
이 규칙 위반 문제를 해결하려면 속성이 getter와 setter를 모두 선언하는지 확인하거나 [Export] 특성을 제거하세요.
경고를 억제해야 하는 경우
이 규칙에서 경고를 표시하지 마세요. 쓰기 전용 멤버는 내보낼 수 없으므로 Godot에서 무시되어 런타임 오류가 발생합니다.