コード例 #1
0
        public static void SaveToSphericalPNG(this Cubemap cubemap, string path)
        {
            Texture2D texture2D = cubemap.GetSphericalTexture2D();

            texture2D.SaveToPNG(path);
            if (Application.isPlaying)
            {
                GameObject.Destroy(texture2D);
            }
            else
            {
                GameObject.DestroyImmediate(texture2D);
            }
        }