/// <summary>
        /// UVマップを取得する
        /// </summary>
        /// <param name="mesh"></param>
        /// <param name="subMeshIndex"></param>
        /// <param name="texture"></param>
        /// <returns></returns>
        public Texture2D GenerateUVMap(Mesh mesh, MaterialInfo matInfo)
        {
            var texture   = matInfo.Texture;
            var triangles = new List <int>();

            foreach (var slotIndex in matInfo.MaterialSlotIndices)
            {
                triangles.AddRange(mesh.GetTriangles(slotIndex));
            }
            var uvs = mesh.uv;

            if (uvs.Count() <= 0 || triangles.Count() <= 0)
            {
                return(null);
            }

            for (int i = 0; i < uvs.Length; i++)
            {
                uvs[i] = new Vector2(Mathf.Repeat(uvs[i].x, 1.0f), Mathf.Repeat(uvs[i].y, 1.0f));
            }

            ComputeShader cs     = Object.Instantiate(AssetRepository.LoadCreateUVMapComputeShader());
            int           kernel = cs.FindKernel("CSMain");

            var uvMapRT = new RenderTexture(texture.width, texture.height, 0, RenderTextureFormat.ARGB32)
            {
                enableRandomWrite = true,
                anisoLevel        = texture.anisoLevel,
                mipMapBias        = texture.mipMapBias,
                filterMode        = texture.filterMode,
                wrapMode          = texture.wrapMode,
                wrapModeU         = texture.wrapModeU,
                wrapModeV         = texture.wrapModeV,
                wrapModeW         = texture.wrapModeW
            };

            uvMapRT.Create();

            var triangleBuffer = new ComputeBuffer(triangles.Count(), sizeof(int));
            var uvBuffer       = new ComputeBuffer(uvs.Count(), Marshal.SizeOf(typeof(Vector2)));

            triangleBuffer.SetData(triangles);
            uvBuffer.SetData(uvs);

            cs.SetTexture(kernel, CS_VARIABLE_UVMAP, uvMapRT);
            cs.SetInt(CS_VARIABLE_WIDTH, texture.width);
            cs.SetInt(CS_VARIABLE_HEIGHT, texture.height);
            cs.SetBuffer(kernel, CS_VARIABLE_TRIANGLES, triangleBuffer);
            cs.SetBuffer(kernel, CS_VARIABLE_UVS, uvBuffer);

            cs.Dispatch(kernel, triangles.Count() / 3, 1, 1);

            triangleBuffer.Release();
            uvBuffer.Release();

            Texture2D uvMapTex = new Texture2D(texture.width, texture.height, TextureFormat.RGB24, false)
            {
                name = texture.name
            };

            var original = RenderTexture.active;

            RenderTexture.active = uvMapRT;
            uvMapTex.ReadPixels(new Rect(0, 0, uvMapRT.width, uvMapRT.height), 0, 0);
            uvMapTex.Apply();
            RenderTexture.active = original;

            uvMapRT.Release();

            uvMapTexture = uvMapTex;

            return(uvMapTex);
        }