unity模型文件外置替换 #182
Unanswered
StarDamnSucks
asked this question in
Q&A
Replies: 1 comment 2 replies
-
如何引用untiy文件 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
目前我使用electron-vite遇到两个问题
(1)在开发模式下如何访问resources目录下的文件?我需要在组件中使用unity,由于unity模型需要可以进行替换,因此我将unity模型文件放在resouces文件夹下,我目前使用“../../resources/”的路径可以在打包后访问到文件,但是在开发模式下不能访问到,这个问题怎么解决?
(2)由于项目中的unity文件需要可替换,因此我放在了resources文件夹下,但是尽管目前能够正确加载,但是当unity模型文件在替换后就不能正常运行了,似乎是因为loader.js文件被打包进了asar中,放在public文件夹下可以正常运行,但是在打包后相关资源并没有放入resources文件夹下,因此unity的模型文件不能替换
我找了一圈没有找到解决办法,希望能够帮我解答下疑问,感谢
Beta Was this translation helpful? Give feedback.
All reactions