コード例 #1
0
    public void Generate()
    {
        ObjectData objectData = ParseObjTextFile(filePath);

        MeshFilter meshFilter = gameObject.GetComponent <MeshFilter>();

        meshFilter.sharedMesh = objectData.CreateMesh(automaticNormals);

        //MeshRenderer renderer = gameObject.GetComponent<MeshRenderer>();
        //renderer.sharedMaterial = new Material(Shader.Find("Standard"));
    }