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

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