Unity3D中 TimeLine打成 AssetBundle 包的BUG_playableasset returned a null playable on instanti-程序员宅基地

(1)

Unity3D中 TimeLine打成AB包的BUG

https://www.jianshu.com/p/a63141ea5fec

当把包含TimeLine的的预设打成AssetBundle时,运行后会有概率触发找不到Playable Director的脚本,然后TimeLine播放失败.IOS,Android 都会触发.

 

image.png

经过多方尝试后,发现只要打包前将包含TimeLine的预设打开一次,再次打包则能修复TimeLine播放失败的BUG.(老中医解决方案).
笔者版本 Unity 2019.1.10f1



作者:_ArayA_
链接:https://www.jianshu.com/p/a63141ea5fec
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

(2)

脚本 Unity2017中TimeLine中有PlayableAsset可以通过Assetbundle加载吗?

http://www.manew.com/thread-135019-1-1.html

加载带有PlaybleTrack的Timeline之后一直报错:Assertion failed: Assertion failed on expression: 'pred(*previous, *i)',并且,PlatableTrack中上关联的物体都错乱了?

我解决这个问题了,把timeline要用到的GameObject做成一个预设,加载后动态添加PlayableDirector,然后依次给每个clip赋值就行了,timeline能正常跑,也不会报错

(3)

iOS Timeline / PlayableDirector not working in AssetBundles

https://forum.unity.com/threads/ios-timeline-playabledirector-not-working-in-assetbundles.515426/

Hi,

we have a problem on iOS with AssetBundles, that include Timeline Animations. The AssetBundle is working, but the Animation is not playing. The errors are:

PlayableAsset returned a null Playable on Instantiate
PlayableGraph being evaluated with no outputs. Playables will not be updated

On Android and in Editor Playmode all is working well.

The Problem seems to be a duplicate to

https://issuetracker.unity3d.com/is...ading-with-unitywebrequest-dot-getassetbundle

but this issue seems to be closed as resolved?

But with Unity 2017.3.0f3 it is still existing.

Reproduced on iPad 4 iOS 10.3.3
Reproduced on iPhone 5s iOS 10.2.1
Used Unity 2017.3.0f3

IL2CPP Code Stripping was on and off. Both testet, bug everytime. The Timeline was known and exported to the App. Because DummyTimeLines were included for testing.

AssetBundle was loaded by WWW, AssetBundle.Load and File.ReadAllBytes and get the Bundle from the bytes.

There seems to be no workaround. The only way is, to rework all Timeline Animations to "Standard AnimationController" Animations and use the old way. With a lot of animations with keys to audio this is not the desired way and Timeline Support would be really great!

Anyone else having this problem? Is there still a bugreport running? I found only the one above.

Greetings,

Martin

 

There is a workaround posted in another thread:

https://forum.unity.com/threads/timelines-do-not-work-in-scene-bundles-on-ios.496157/

Look at the post of
ZeFirestarter from 13.2.2018. The workaround worked for us.

 

Just wanted to post for the benefit of others.
I recently ran into the same issue and wanted to post my work around.

It's rather simple, but unfortunate to have to do it.

Just add a PlayableDirector component into a scene that is included in your build. In my case I chose our boot scene.
Then create a Timeline asset that won't be used. I named it emptyTimeline for clarity.
Assign this to your PlayableDirector and the problem should be resolved.

It's worth noting you will also get this issue on Android if using IL2CPP builds or with Mono builds using a stripping level other than disabled.

 

The alternative is to create "link.xml" file which includes classes from "UnityEngine.Playables" namespace. This also solves the issue.

Didn't have a great deal of luck with link.xml, it appeared to work at first then stopped.
Simpler solution even than including a timeline in a non-bundled scene is simply to create an empty .playable file in Resources/. It'll only be about 200 bytes, that seems to prevent stripping.
e.g. In any scene add a Timeline, save the playable to resources, delete the timeline.

 

https://issuetracker.unity3d.com/is...ctor-dot-playable-when-used-in-an-assetbundle
 

Code (JavaScript):

  1.     <assembly fullname="UnityEngine.Timeline">

  2.         <namespace fullname="UnityEngine.Timeline" preserve="all"/>

  3.     </assembly>

 

 

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/kuangben2000/article/details/104825418

智能推荐

2024最新计算机毕业设计选题大全-程序员宅基地

文章浏览阅读1.6k次,点赞12次,收藏7次。大家好!大四的同学们毕业设计即将开始了,你们做好准备了吗?学长给大家精心整理了最新的计算机毕业设计选题,希望能为你们提供帮助。如果在选题过程中有任何疑问,都可以随时问我,我会尽力帮助大家。在选择毕业设计选题时,有几个要点需要考虑。首先,选题应与计算机专业密切相关,并且符合当前行业的发展趋势。选择与专业紧密结合的选题,可以使你们更好地运用所学知识,并为未来的职业发展奠定基础。要考虑选题的实际可行性和创新性。选题应具备一定的实践意义和应用前景,能够解决实际问题或改善现有技术。

dcn网络与公网_电信运营商DCN网络的演变与规划方法(The evolution and plan method of DCN)...-程序员宅基地

文章浏览阅读3.4k次。摘要:随着电信业务的发展和电信企业经营方式的转变,DCN网络的定位发生了重大的演变。本文基于这种变化,重点讨论DCN网络的规划方法和运维管理方法。Digest: With the development oftelecommunication bussiness and the change of management of telecomcarrier , DCN’s role will cha..._电信dcn

动手深度学习矩阵求导_向量变元是什么-程序员宅基地

文章浏览阅读442次。深度学习一部分矩阵求导知识的搬运总结_向量变元是什么

月薪已炒到15w?真心建议大家冲一冲数据新兴领域,人才缺口极大!-程序员宅基地

文章浏览阅读8次。近期,裁员的公司越来越多今天想和大家聊聊职场人的新出路。作为席卷全球的新概念ESG已然成为当前各个行业关注的最热风口目前,国内官方发布了一项ESG新证书含金量五颗星、中文ESG证书、完整ESG考试体系、名师主讲...而ESG又是与人力资源直接相关甚至在行业圈内成为大佬们的热门话题...当前行业下行,裁员的公司也越来越多大家还是冲一冲这个新兴领域01 ESG为什么重要?在双碳的大背景下,ESG已然成...

对比传统运营模式,为什么越拉越多的企业选择上云?_系统上云的前后对比-程序员宅基地

文章浏览阅读356次。云计算快速渗透到众多的行业,使中小企业受益于技术变革。最近微软SMB的一项研究发现,到今年年底,78%的中小企业将以某种方式使用云。企业希望投入少、收益高,来取得更大的发展机会。云计算将中小企业信息化的成本大幅降低,它们不必再建本地互联网基础设施,节省时间和资金,降低了企业经营风险。科技创新已成时代的潮流,中小企业上云是创新前提。云平台稳定、安全、便捷的IT环境,提升企业经营效率的同时,也为企业..._系统上云的前后对比

esxi网卡直通后虚拟机无网_esxi虚拟机无法联网-程序员宅基地

文章浏览阅读899次。出现选网卡的时候无法选中,这里应该是一个bug。3.保存退出,重启虚拟机即可。1.先随便选择一个网卡。2.勾先取消再重新勾选。_esxi虚拟机无法联网

随便推点

在LaTeX中使用.bib文件统一管理参考文献_egbib-程序员宅基地

文章浏览阅读913次。在LaTeX中,可在.tex文件的同一级目录下创建egbib.bib文件,所有的参考文件信息可以统一写在egbib.bib文件中,然后在.tex文件的\end{document}前加入如下几行代码:{\small\bibliographystyle{IEEEtran}\bibliography{egbib}}即可在文章中用~\cite{}宏命令便捷的插入文内引用,且文章的Reference部分会自动排序、编号。..._egbib

Unity Shader - Predefined Shader preprocessor macros 着色器预处理宏-程序员宅基地

文章浏览阅读950次。目录:Unity Shader - 知识点目录(先占位,后续持续更新)原文:Predefined Shader preprocessor macros版本:2019.1Predefined Shader preprocessor macros着色器预处理宏Unity 编译 shader programs 期间的一些预处理宏。(本篇的宏介绍随便看看就好,要想深入了解,还是直接看Unity...

大数据平台,从“治理”数据谈起-程序员宅基地

文章浏览阅读195次。本文目录:一、大数据时代还需要数据治理吗?二、如何面向用户开展大数据治理?三、面向用户的自服务大数据治理架构四、总结一、大数据时代还需要数据治理吗?数据平台发展过程中随处可见的数据问题大数据不是凭空而来,1981年第一个数据仓库诞生,到现在已经有了近40年的历史,相对数据仓库来说我还是个年轻人。而国内企业数据平台的建设大概从90年代末就开始了,从第一代架构出现到..._数据治理从0搭建

大学抢课python脚本_用彪悍的Python写了一个自动选课的脚本 | 学步园-程序员宅基地

文章浏览阅读2.2k次,点赞4次,收藏12次。高手请一笑而过。物理实验课别人已经做过3、4个了,自己一个还没做呢。不是咱不想做,而是咱不想起那么早,并且仅有的一次起得早,但是哈工大的服务器竟然超负荷,不停刷新还是不行,不禁感慨这才是真正的“万马争过独木桥“啊!服务器不给力啊……好了,废话少说。其实,我的想法很简单。写一个三重循环,不停地提交,直到所有的数据都accepted。其中最关键的是提交最后一个页面,因为提交用户名和密码后不需要再访问其..._哈尔滨工业大学抢课脚本

english_html_study english html-程序员宅基地

文章浏览阅读4.9k次。一些别人收集的英文站点 http://www.lifeinchina.cn (nice) http://www.huaren.us/ (nice) http://www.hindu.com (okay) http://www.italki.com www.talkdatalk.com (transfer)http://www.en8848.com.cn/yingyu/index._study english html

Cortex-M3双堆栈MSP和PSP_stm32 msp psp-程序员宅基地

文章浏览阅读5.5k次,点赞19次,收藏78次。什么是栈?在谈M3堆栈之前我们先回忆一下数据结构中的栈。栈是一种先进后出的数据结构(类似于枪支的弹夹,先放入的子弹最后打出,后放入的子弹先打出)。M3内核的堆栈也不例外,也是先进后出的。栈的作用?局部变量内存的开销,函数的调用都离不开栈。了解了栈的概念和基本作用后我们来看M3的双堆栈栈cortex-M3内核使用了双堆栈,即MSP和PSP,这极大的方便了OS的设计。MSP的含义是Main..._stm32 msp psp

推荐文章

热门文章

相关标签