We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
加载逻辑中:加载BundleA时发现 A依赖于B,A对B持有引用,则对B引用计数加1,但如果存在多级依赖,比如一个Prefab A依赖一个材质 B,材质 B依赖一张贴图 C,ABC都是单独打成Bundle, A依赖于B和C,加载A时B、C的计数都会加1,但实际上B依赖于C,C被A,B引用,引用计数应该是2
The text was updated successfully, but these errors were encountered:
这个地方不需要管直接引用还是间接引用,A依赖于B,B依赖于C,那么A依赖于B、C,不需要管B于C之间的关系,加载的时候只要保证A、B、C都加载出来,A就没问题了;如果A在异步加载的同时也加载了D,而D也依赖于C,那么C的引用计数会变成2,此时A加载完毕,A、B由于引用计数归0而被卸载(假设非常驻资源),C会由于引用计数为1而保留,这个时候D依然能正确被加载出来。我的分析没有错误吧?
Sorry, something went wrong.
No branches or pull requests
加载逻辑中:加载BundleA时发现 A依赖于B,A对B持有引用,则对B引用计数加1,但如果存在多级依赖,比如一个Prefab A依赖一个材质 B,材质 B依赖一张贴图 C,ABC都是单独打成Bundle, A依赖于B和C,加载A时B、C的计数都会加1,但实际上B依赖于C,C被A,B引用,引用计数应该是2
The text was updated successfully, but these errors were encountered: