UTKAccodion 완료. UTKComponentList 수정 중
This commit is contained in:
29
CLAUDE.md
29
CLAUDE.md
@@ -227,6 +227,35 @@ public struct AssetRef<T> where T : UnityEngine.Object
|
||||
- `LoadAssetAsync` 핸들은 수명 관리 후 `Release`
|
||||
- GameObject 직접 참조 대신 경로 문자열 직렬화
|
||||
|
||||
### UXML/USS 파일 네이밍 규칙
|
||||
|
||||
**⚠️ 중요: UXML과 USS 파일명은 반드시 다르게 지정해야 합니다.**
|
||||
|
||||
`Resources.Load<T>(path)`는 확장자 없이 경로를 받기 때문에, 동일한 경로에 UXML과 USS가 모두 존재하면 로드 충돌이 발생할 수 있습니다.
|
||||
|
||||
```csharp
|
||||
// ❌ 잘못된 예: 동일한 경로명 사용
|
||||
private const string UXML_PATH = "UIToolkit/Window/UTKAccordionListWindow";
|
||||
private const string USS_PATH = "UIToolkit/Window/UTKAccordionListWindow";
|
||||
|
||||
// Resources.Load<VisualTreeAsset>(UXML_PATH); // .uxml 로드
|
||||
// Resources.Load<StyleSheet>(USS_PATH); // .uss 로드 실패 가능
|
||||
|
||||
// ✅ 올바른 예: USS 파일명에 접미사 추가
|
||||
private const string UXML_PATH = "UIToolkit/Window/UTKAccordionListWindow";
|
||||
private const string USS_PATH = "UIToolkit/Window/UTKAccordionListWindowUss";
|
||||
|
||||
// 파일 구조:
|
||||
// - UTKAccordionListWindow.uxml
|
||||
// - UTKAccordionListWindowUss.uss
|
||||
```
|
||||
|
||||
**네이밍 규칙:**
|
||||
| 파일 유형 | 네이밍 패턴 | 예시 |
|
||||
|-----------|-------------|------|
|
||||
| UXML | `{ComponentName}.uxml` | `UTKAccordionListWindow.uxml` |
|
||||
| USS | `{ComponentName}Uss.uss` | `UTKAccordionListWindowUss.uss` |
|
||||
|
||||
---
|
||||
|
||||
## 7) USS 스타일 가이드
|
||||
|
||||
Reference in New Issue
Block a user