Comments (7)
你用的是最新版本么?这个冲突我改过如下图可以解决问题。直接引入第三方库是一个没辙的方案,因为Unity没有**仓库,没办法所有第三方包都通过**仓库引入。如果自己将第三方仓库发布也同样有问题,因为没有统一的**仓库管理,大家都发布在不同的第三方仓库,各自发布自己的,各自引入自己的,最终还是会冲突。
from loxodon-framework.
我使用的是Unity2021.3.1f1,默认的Windows平台,Fody包版本 com.vovgou.loxodon-framework-fody@e8b32d45e8 应该是新版Unity做了一些改动吧。
用空工程重新复现了一下,简单记录一下遇到的问题。
1 导入之后就会报错,可能是.asmdef的配置选项有所更新,导致某些配置不正确。标红框的是修改的地方
这些配置修改后,Fody就不报错,也可以正常使用了
2 导入[email protected]
导入之后,就会报Mono.Cecil相关库文件的冲突
我看Burst对相关库文件的处理是这样的,就参考了一下
将Fody库里面的Mono.Cecil改名就可以解决问题了,改成这样:
至此,就可以正常使用Fody和runtime-scene-serialization了
from loxodon-framework.
这个设置是对的,见图:PropertyChanged.Fody.dll我特意排除在项目之外的,它这个库没有命名空间,导致跟别的一些库类名冲突,这样库只有在执行静态织入时使用,平时也不需要,所以我特意排除在项目之外,通过在织入时动态加载dll载入的。
和这个库相同的目录下报错的那2个类是没用的,应该是需要被删除的,我开发的github库和发布的不是同一个库,漏删了。直接删除就好。回头我发布新版本删除一下。
另外你引入的那个runtime-scene-serialization插件,你的unity版本是哪个?我都下载不到这个插件。回头我找了这个插件试试,不过这种情况不是很好避免,大家引入第三方库没有统一的规范。
遇到这种问题,你可以讲包拷贝到 Packages目录中,然后删除@和后面的版本号,变成一个本地包,就可以随便改了,如下图:
from loxodon-framework.
我使用的是Unity 2021.3.1f1
[email protected] 这个库应该还在preview阶段
我刚刚试了一下打包好的Fody版本,把Mono.Cecil相关的库文件放到自定义的本地包目录可以解决不同版本Mono.Cecil引用冲突的问题,放在Assets目录下的Mono.Cecil没法避免冲突。
非常感谢您的耐心解答!
from loxodon-framework.
我刚才也测试了下,查看com.unity.runtime-scene-serialization插件,它引入了官方提供的[email protected],我尝试也引入这个包,结果版本不符,它这个是target 3.5版本,我需要4.x版本。看来无论怎么搞,只要同时载入Mono.Cecil.dll到内存中,都可能会冲突。
你说的这个方案是怎么做的?是将Fody相关的包都不引入项目,在需要注入代码时动态载入DLL的么?
你方便加下QQ群(622321589)不,这个沟通效率比较低
from loxodon-framework.
我进一下群吧
from loxodon-framework.
我进一下群吧
好的,你进群了@我一下
from loxodon-framework.
Related Issues (20)
- 订阅消息会导致VM无法被回收 HOT 1
- Lua View 的数据绑定失败问题 HOT 1
- Any reason to implement IServiceBundle or extend AbstractServiceBundle? HOT 3
- ChainedObjectSourceProxy 存在内存泄漏 HOT 1
- Async & Await Tutorials Error HOT 1
- What is the reason of catching all exceptions in `Subject<>.Publish` HOT 1
- 請問關於數據綁定,如何注入委託函數 HOT 1
- Databinding Examples HOT 2
- log4 插件导入会报错 HOT 1
- Related to enter play mode settings HOT 6
- Git tag v2.4.5 is not aligned with the version update commit HOT 1
- Service container doesn't register generics properly HOT 3
- ProxyType.cs的IsParameterMatch存在问题 HOT 2
- Encryption HOT 3
- Inquiry HOT 3
- [Feature] Split the framework further HOT 1
- Loxodon.Framework.Prefs.DefaultEncryptor带参数的构造函数中key和iv没有赋值啊??? HOT 1
- 请教一下使用ResourcesViewLocator加载的资产什么时候释放呢 HOT 1
- 在FormattableTextMeshProUGUI & TemplateTextMeshProUGUI中Text.text会被自身的OnEnable设置为初始值 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loxodon-framework.