using System.Collections; using System.Collections.Generic; using UnityEngine; public class VideoManager : MonoBehaviour { public static VideoManager instance; public GameObject[] Videos; bool isPostWeb; public void Start() { instance = this; } public void PostMessageToWeb() { //if (isPostWeb) //{ // BrideWebView.Instance.webViewPrefab.WebView.PostMessage("生产工艺"); // Debug.Log("(C#Log)JSON Post:" + "生产工艺"); //} } public void ShowVideo(string name) { if (name.Contains("生产工艺")) { Videos[0].SetActive(true); isPostWeb = true; } else if (name.Contains("煤磨")) { Videos[1].SetActive(true); isPostWeb = false; } else if (name.Contains("空压机")) { Videos[2].SetActive(true); isPostWeb = false; } else if (name.Contains("余热发电")) { Videos[3].SetActive(true); isPostWeb = false; } else if (name.Contains("垃圾发电")) { Videos[4].SetActive(true); isPostWeb = false; } } }