Fix VideoPanel reference, automatically find Canvas/VideoPanel and add components if missing
This commit is contained in:
@@ -409,6 +409,17 @@ public class PageController : MonoBehaviour
|
||||
float waitTime = 1f; // 默认等1秒
|
||||
var am = FindObjectOfType<AudioManager>();
|
||||
|
||||
// --- 新增:强制隐藏视频面板 ---
|
||||
var allT = Resources.FindObjectsOfTypeAll<Transform>();
|
||||
foreach (var t in allT)
|
||||
{
|
||||
if (t.name == "VideoPanel" && t.parent != null && t.parent.name == "Canvas")
|
||||
{
|
||||
t.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
// ------------------------------
|
||||
|
||||
// 实验刚开始,立刻激活鞋子,不等语音播完
|
||||
var shose = GameObject.Find("Shose");
|
||||
if (shose == null)
|
||||
|
||||
Reference in New Issue
Block a user