기본 Styleguide 완료

This commit is contained in:
logonkhi
2026-01-21 20:43:54 +09:00
parent fd8f8c6de0
commit e00953de52
122 changed files with 3310 additions and 709 deletions

View File

@@ -6,9 +6,78 @@ using UnityEngine.UIElements;
namespace UVC.UIToolkit
{
/// <summary>
/// Bounds 입력 필드 컴포넌트.
/// Bounds(경계 상자) 입력 필드 컴포넌트.
/// Unity BoundsField를 래핑하여 커스텀 스타일을 적용합니다.
/// 3D 공간에서 객체의 경계를 정의하는 Center(중심점)와 Extents(크기)를 입력받습니다.
/// </summary>
/// <remarks>
/// <para><b>Bounds란?</b></para>
/// <para>Bounds는 3D 공간에서 축 정렬 경계 상자(AABB)를 나타냅니다.</para>
/// <para>- Center: 경계 상자의 중심점 (Vector3)</para>
/// <para>- Extents: 중심에서 각 축 방향으로의 거리 (Vector3), Size의 절반 값</para>
/// <para>- Size: 경계 상자의 전체 크기 (Extents * 2)</para>
/// </remarks>
/// <example>
/// <para><b>C# 코드에서 사용:</b></para>
/// <code>
/// // 기본 Bounds 필드 생성
/// var boundsField = new UTKBoundsField();
/// boundsField.label = "충돌 영역";
///
/// // 초기값 설정 (중심점: 0,1,0 / 크기: 2,2,2)
/// boundsField.Value = new Bounds(
/// new Vector3(0, 1, 0), // center
/// new Vector3(2, 2, 2) // size (extents의 2배)
/// );
///
/// // 값 변경 이벤트 처리
/// boundsField.OnValueChanged += (bounds) => {
/// Debug.Log($"중심점: {bounds.center}");
/// Debug.Log($"크기: {bounds.size}");
/// Debug.Log($"최소점: {bounds.min}, 최대점: {bounds.max}");
/// };
///
/// // 라벨 커스터마이징
/// boundsField.CenterLabel = "중심";
/// boundsField.ExtentsLabel = "범위";
/// boundsField.XLabel = "가로";
/// boundsField.YLabel = "높이";
/// boundsField.ZLabel = "깊이";
///
/// // 비활성화
/// boundsField.IsEnabled = false;
/// </code>
/// <para><b>UXML에서 사용:</b></para>
/// <code>
/// <!-- 네임스페이스 선언 -->
/// <UXML xmlns:utk="UVC.UIToolkit">
/// <!-- 기본 Bounds 필드 -->
/// <utk:UTKBoundsField label="경계 영역" />
///
/// <!-- 커스텀 라벨 -->
/// <utk:UTKBoundsField
/// label="충돌 박스"
/// center-label="위치"
/// extents-label="크기" />
///
/// <!-- 비활성화 -->
/// <utk:UTKBoundsField label="읽기전용" is-enabled="false" />
/// </UXML>
/// </code>
/// <para><b>실제 활용 예시:</b></para>
/// <code>
/// // 게임 오브젝트의 콜라이더 경계 설정
/// var colliderBounds = new UTKBoundsField("콜라이더 경계");
/// colliderBounds.OnValueChanged += (bounds) => {
/// var boxCollider = targetObject.GetComponent<BoxCollider>();
/// if (boxCollider != null)
/// {
/// boxCollider.center = bounds.center;
/// boxCollider.size = bounds.size;
/// }
/// };
/// </code>
/// </example>
[UxmlElement]
public partial class UTKBoundsField : BoundsField, IDisposable
{