File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Runtime/Scripts/Util/ImportExport Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -53,5 +53,18 @@ static void ImportURDF(MenuCommand menuCommand) {
5353
5454 }
5555
56+ [ MenuItem ( "GameObject/ZeroSim/Import OBJ..." , false , 0 ) ]
57+ static void ImportOBJ ( MenuCommand menuCommand ) {
58+ string filePath = EditorUtility . OpenFilePanel ( "Import OBJ" , "." , "obj" ) ;
59+
60+ if ( filePath . Length == 0 ) {
61+ return ;
62+ }
63+
64+ ZOImportOBJ . Import ( filePath ) ;
65+
66+ }
67+
68+
5669 }
5770}
Original file line number Diff line number Diff line change @@ -104,9 +104,9 @@ protected static Material[] ImportMTLFile(string mtlFilePath) {
104104 }
105105 }
106106
107- // if (currentMaterial != null) {
108- // materials.Add(currentMaterial);
109- // }
107+ if ( currentMaterial != null ) {
108+ materials . Add ( currentMaterial ) ;
109+ }
110110
111111 return materials . ToArray ( ) ;
112112 }
You can’t perform that action at this time.
0 commit comments