public static GameObject LoadModelFile(string filePath, Material material) { GameObject modelGo = ModelLoaderEx.LoadModelGameObject(filePath, material); modelGo.name = Path.GetFileName(filePath); return(modelGo); }
// Use this for initialization void Start() { GameObject go = ModelLoaderEx.LoadModelGameObject("/Users/yifengwu/Desktop/test.obj"); go.name = "Test Model"; }