简体   繁体   中英

How to setting test runner in unity 2018 , And dont rebuild my assetbundle?

, when I run a test runner, in unity 2018.4.3 it have to create a Assembly Definition to test, I need "test my game logic",So I have to references "assembly-CShrap.dll" but I can't find that !! 上传_2019-9-19_9-42-48.png

So I have a tricky solution like that

https://stackoverflow.com/questions...nity-and-fix-missing-assembly-reference-error

I create a new Assemlby define to in include all script上传_2019-9-19_9-50-46.png and reference to test assemlby define上传_2019-9-19_9-51-16.png Ok it work, But when I load assetbundle Get this error meesage!

A scripted object (probably UIButton?) has a different serialization layout when loading. (Read 32 bytes but expected 344 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts? UnityEngine.AssetBundle:get_mainAsset()

It look like myAssembly define changed, And My "Old Assetbundle" can not load sccuess, So I dont want to rebuild all Assetbundle, So how can I do?

I Found soultion: TestRunner -> EditorMode -> Enable playmode tests for all assmblies 在此处输入图像描述 Play mode also, But have to reopen Unity after setting

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM