在嘗試製作AR MV時,使用Timeline來控制歌詞的出現
但發現輸出到手機後,按播放都沒有反應,檢查了按鈕的設定跟一堆東西後,發現是timeline並沒有被觸發,查詢之下,發現是Unity Timeline目前的bug之一。
解決辦法是在Unity Assets資料夾下新增一個link.xml檔案,並在裡面寫下:
<linker> <assembly fullname="UnityEngine.Timeline" preserve="all"/> <assembly fullname="Unity.Timeline" preserve="all"/> <assembly fullname="UnityEngine"> <namespace fullname="UnityEngine.Playables" preserve="all"/> </assembly> </linker>
這樣在輸出的時候,會將其註冊成AssetBundle,而不會被Unity濾掉,Timeline就可以正常運作。
Reference:
https://www.yui-tech-blog.com/entry/2019/12/09/【Unity】Unityを2019にアップグレードしたらTimelineが上手く再