Projext/Assets/02_Scripts/UI/Menu/GraphicsSettingsScroll.cs
hydrozen e989d20668 카툰 쉐이더 추가 + 중복 스크립트 수정 + 전체 업데이트
- ToonPostProcess.shader: 횃불 고딕 스타일 후처리 쉐이더 (Built-in RP)
- ToonCameraEffect.cs: 카메라 자동 부착 후처리 스크립트
- 중복 UI 스크립트 제거 (MenuIntroController, ToggleCustom)
- 씬, 프리팹, 애니메이션 등 전체 업데이트

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 12:31:16 +09:00

79 lines
1.9 KiB
C#

using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using System.Collections;
public class GraphicsSettingsScroll : MonoBehaviour, IDragHandler, IScrollHandler
{
public RectTransform[] ; // ← 배열로 변경!
public float = 2f;
public float = 50f;
private RectTransform ;
private RectTransform ; // 현재 활성화된 내용
void Start()
{
= GetComponent<RectTransform>();
StartCoroutine(());
}
IEnumerator ()
{
yield return null;
yield return null;
();
}
void ()
{
foreach (RectTransform in )
{
if ( != null && .gameObject.activeInHierarchy)
{
= ;
Debug.Log("현재내용: " + .name);
return;
}
}
Debug.Log("현재내용 못찾음!");
}
float ()
{
if ( == null) return 0;
return Mathf.Max(0, .rect.height - .rect.height);
}
public void OnDrag(PointerEventData )
{
();
(-.delta.y * );
}
public void OnScroll(PointerEventData )
{
();
(-.scrollDelta.y * );
}
void (float )
{
if ( == null) return;
float Y = .anchoredPosition.y + ;
Y = Mathf.Clamp(Y, 0, ());
.anchoredPosition = new Vector2(0, Y);
}
public void ()
{
Canvas.ForceUpdateCanvases();
();
if ( != null)
{
LayoutRebuilder.ForceRebuildLayoutImmediate();
.anchoredPosition = new Vector2(0, 0);
}
}
}