//(Resources要求)文件需放在 xxxx/Resources/Image/logo2.png
Texture texture = Resources.Load<Texture>("Image/logo2");
TextureMain.mainTexture = texture;
Texture texture = Resources.Load<Texture>("Image/logo2");
TextureMain.mainTexture = texture;
本文介绍如何在Unity中通过Resources.Load方法加载指定路径下的图片资源logo2.png,并将其赋值给TextureMain的主要纹理属性。

被折叠的 条评论
为什么被折叠?