Projext/Assets/Scripts/Systems/Scene/LoadScene.cs
2026-02-13 00:23:25 +09:00

14 lines
782 B
C#

using System.Collections; // 컬렉션 기능을 사용할거에요 -> System.Collections를
using System.Collections.Generic; // 제네릭 컬렉션 기능을 사용할거에요 -> System.Collections.Generic을
using UnityEngine; // 유니티 엔진의 기본 기능을 불러올거에요 -> UnityEngine을
using UnityEngine.SceneManagement; // 씬 관리 기능을 사용할거에요 -> UnityEngine.SceneManagement를
public class LoadScene : MonoBehaviour // 클래스를 선언할거에요 -> MonoBehaviour를 상속받는 LoadScene을
{
[SerializeField] private string sceneName; // 변수를 선언할거에요 -> 로드할 씬 이름을 저장할 sceneName을
public void LoadOtherScene() // 함수를 선언할거에요 -> 다른 씬을 로드하는 LoadOtherScene을
{
SceneManager.LoadScene(sceneName); // 실행할거에요 -> 지정된 이름의 씬을 로드하는 기능을
}
}