Skip to content
New issue

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

请教一下使用ResourcesViewLocator加载的资产什么时候释放呢 #37

Closed
ericzhanchina opened this issue Dec 15, 2023 · 1 comment

Comments

@ericzhanchina
Copy link

请教一下使用ResourcesViewLocator加载的资产什么时候释放呢,如果使用了XAsset异步加载了资产,不需要主动调用release吗?

@vovgou
Copy link
Owner

vovgou commented Dec 18, 2023

根据IUIViewLocator的接口,自定义一个XAssetViewLocator的实现,通过XAsset加载Window或者View,实例化后,可以自己挂载一个管理生命周期的脚本,在这个脚本的OnDestroy函数中调用XAsset的Release函数释放即可。

@vovgou vovgou closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants