unity选择build and run后动效不播放的疑问

在学习FariyGUI的过程中,我尝试做了一个游戏开始界面的动效,在unity中进行Play时动效可以播放,但是,当我直接点击build and run后,动效并没有播放。尝试了多次,没有效果。请问这个要怎么解决呢?下面是获取动效的代码
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;

public class StartMenu : MonoBehaviour
{
private GComponent mainUI;

// Start is called before the first frame update
void Start()
{
mainUI = GetComponent<UIPanel>().ui;
Transition t = mainUI.GetTransition("t0");
t.Play();
}

}
已邀请:

要回复问题请先登录注册