将图像纹理类型更改为" Cubemap"使用Unity Scripting API

时间:2016-08-30 07:06:53

标签: c# unity3d

使用 Unity Inspector ,可以很容易地将图像的纹理类型更改为 Cubemap (附图中的图像)

enter image description here

我想使用C#脚本实现相同的目标。谷歌搜索了很多没有具体的东西。

首先,我进行网络调用以下载我的panaromic 360图像并等待它产生。一切都好!

image = new WWW (subplacesList [this.curSubPlace].getImage ());
while( !image.isDone ) {
    curLoading = image.progress * 100;
    progressImg.fillAmount =  image.progress;
    yield return null;
}   

上面的代码为我提供了 WWW 对象。我可以使用 image.texture 转换为 Texture2D对象,但这不是我想要的。

我尝试将图片类型更改为Cubemap,以便将其应用于素材并更改天空盒。

注意:我一直在下载图像并将其包装到Unlit / InsideVisible球体作为替代,但它非常糟糕。任何帮助将不胜感激!

0 个答案:

没有答案