37 lines
974 B
C#
37 lines
974 B
C#
using UnityEngine;
|
|
using UVC.Core;
|
|
|
|
namespace Sample
|
|
{
|
|
/// <summary>
|
|
/// Type C: Prefab 기반 - Scene 라이프사이클
|
|
/// 씬별 UI 테마나 설정이 다른 경우
|
|
/// </summary>
|
|
public class InjectorSampleSceneUI : MonoBehaviour, ISceneUI
|
|
{
|
|
[Header("Scene Specific UI")]
|
|
[SerializeField] private GameObject hudPanel;
|
|
|
|
[Inject] private ILogService _logger;
|
|
[Inject(Optional = true)] private ISceneConfig _sceneConfig;
|
|
|
|
public void Initialize()
|
|
{
|
|
var sceneName = _sceneConfig?.SceneName ?? "Unknown";
|
|
_logger?.Log($"SceneUI initialized for: {sceneName}");
|
|
}
|
|
|
|
public void ShowHUD()
|
|
{
|
|
_logger?.Log("Show HUD");
|
|
if (hudPanel != null) hudPanel.SetActive(true);
|
|
}
|
|
|
|
public void HideHUD()
|
|
{
|
|
_logger?.Log("Hide HUD");
|
|
if (hudPanel != null) hudPanel.SetActive(false);
|
|
}
|
|
}
|
|
}
|