出现这个问题很大可能是因为设置了 Managed Stripping Level => Low
只需要改成 Managed Stripping Level => Medium就可以正常播
或者改Assets/link.xml没有就新建
<linker><assembly fullname="Unity.Timeline" preserve="all" />
</linker>
如果还是不能播放,可以考虑下是不是资源打包出问题了。
上面的代码裁剪掉的明显特征是,真机运行log会出现:
The referenced script (Unknown) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object ‘’) is missing!