估计很多人都遇到过吧。
gdscript 加载图片用 image.load(res路径) 或者 image.load_from_file(res路径) 的时候,就会出现警告:
Loaded resource as image file, this will not work on export ......
也就是说导出成为应用的时候,image类 通过这种加载得到的结果都是空白,因为对应的原始图片文件不打包。
image.load(res路径) 或者 image.load_from_file(res路径) 只能在编辑器里面用,那它们存在的意义是什么 ?
每次我要对一张图片资源转化为纹理并编辑的时候都要: 图片 -》compressedtexture -》image -》imagetexture ,这效率也太低了,有没有什么办法能直接 图片 -》image -》imagetexture 或者 图片 -》imagetexture ?
gdscript 加载图片用 image.load(res路径) 或者 image.load_from_file(res路径) 的时候,就会出现警告:
Loaded resource as image file, this will not work on export ......
也就是说导出成为应用的时候,image类 通过这种加载得到的结果都是空白,因为对应的原始图片文件不打包。
image.load(res路径) 或者 image.load_from_file(res路径) 只能在编辑器里面用,那它们存在的意义是什么 ?
每次我要对一张图片资源转化为纹理并编辑的时候都要: 图片 -》compressedtexture -》image -》imagetexture ,这效率也太低了,有没有什么办法能直接 图片 -》image -》imagetexture 或者 图片 -》imagetexture ?
这里需要注意的是:在切换完导入方式后,需要点击这个面板下方的“重新导入”按钮才会生效。也可以使用这个方法让图片加载为其它类型