ProjectSquareBall/Assets/Scripts/Prep/UI/OnMusicFileSelected.cs
2024-09-04 18:39:41 +05:30

16 lines
353 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OnMusicFileSelected : MonoBehaviour
{
void Awake(){
GetComponent<Button>().onClick.AddListener(OnClicked);
}
void OnClicked(){
MusicLoader.instance.OnFileSelected(GetComponentInChildren<Text>().text);
}
}