29 lines
669 B
C#
29 lines
669 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using BITKit.UX;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.UIElements;
|
|
|
|
namespace Net.Like.Xue.Tokyo.SNS.Demo
|
|
{
|
|
public class SwitchSceneDemo : MonoBehaviour
|
|
{
|
|
[UXBindPath("scene-dropdown")] private DropdownField _sceneDropdown;
|
|
[UXBindPath("entry-scene-button")] private Button _entrySceneButton;
|
|
|
|
private void Start()
|
|
{
|
|
UXUtils.Inject(this);
|
|
_entrySceneButton.clicked += NextLevel;
|
|
|
|
}
|
|
private void NextLevel()
|
|
{
|
|
SceneManager.LoadScene(_sceneDropdown.index);
|
|
}
|
|
|
|
}
|
|
|
|
}
|