峰哥,救救qwq
This commit is contained in:
@ -1,25 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using UMP;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using RenderHeads.Media.AVProVideo;
|
||||
using MediaPlayer = RenderHeads.Media.AVProVideo.MediaPlayer;
|
||||
|
||||
[RequireComponent(typeof(UniversalMediaPlayer))]
|
||||
public class UMPTool : MonoBehaviour
|
||||
{
|
||||
public string path;
|
||||
public Text Message;
|
||||
private UniversalMediaPlayer ump;
|
||||
|
||||
public UniversalMediaPlayer ump;
|
||||
public MediaPlayer mediaPlayer;
|
||||
public MediaPath mediaPath;
|
||||
|
||||
public string deviceId;
|
||||
public string channelId;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init() {
|
||||
public void Init()
|
||||
{
|
||||
/*
|
||||
Debug.Log(mediaPlayer.MediaPath.Path);
|
||||
if (gameObject.activeInHierarchy)
|
||||
{
|
||||
mediaPlayer.gameObject.SetActive(true);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
ump = GetComponent<UniversalMediaPlayer>();
|
||||
ump.Path = Application.streamingAssetsPath + path;
|
||||
// ump.Path = Application.streamingAssetsPath + path;
|
||||
ump.AddEncounteredErrorEvent(() => {
|
||||
Message.text = "当前链接失效!";
|
||||
Message.color = Color.red;
|
||||
@ -31,6 +44,8 @@ public class UMPTool : MonoBehaviour
|
||||
Message.text = "";
|
||||
ump.RenderingObjects[0].GetComponent<RawImage>().color = Color.white;
|
||||
});
|
||||
}
|
||||
|
||||
ump.Play();
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user