Tip:预设Button上
1.添加Video Source组件
2.添加下面的脚本:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PlayVideo : MonoBehaviour
{
private Button playBtn;
private AudioSource aud;
// Start is called before the first frame update
void Start()
{
playBtn = this.GetComponent<Button>();
aud = this.GetComponent<AudioSource>();
playBtn.onClick.AddListener(OnClickPlayBtn);
}
private void OnClickPlayBtn
413



被折叠的 条评论
为什么被折叠?



