public void OnFileSelectionClicked() { string[] extensions = { "All PiXYZ files", "pxz,fbx,igs,iges,stp,step,stpz,stepz,ifc,u3d,CATProduct,CATPart,cgr,CATShape,model,session,sldasm,sldprt,prt,asm*,prt*,neu,neu*,xas,xas*,xpr,xpr*,asm,par,pwd,psm,ipt,iam,ipj,sat,sab," /* ptx,xyz,*/ + " vda,3dm,3dxml,wrl,vrml,dae,stl," /* e57,pts,*/ + " jt,x_t,x_b,p_t,p_b,xmt,xmt_txt,xmt_bin,plmxml,obj,csb,wire,skp,pdf,prc,3ds,dwg,dxf", "FBX files", "fbx", "IGES files", "igs,iges", "STEP files", "stp,step,stepz", "IFC files", "ifc", "U3D files", "u3d", "CATIA files", "CATProduct,CATPart,cgr,CATShape", "SolidWorks files", "sldasm,sldprt", "Creo files", "prt,asm*,prt*,neu,neu*,xas,xas*,xpr,xpr*", "SolidEdge", "asm,par,pwd,psm", "ACIS SAT files", "sat,sab", "VDA-FS files", "vda", "Rhino files", "3dm", "3dxml files", "3dxml", "VRML files", "wrl,vrml", "COLLADA files", "dae", "Stereolithography files", "stl", "JT files", "jt", "Parasolid files", "x_t,x_b,p_t,p_b,xmt,xmt_txt,xmt_bin", "PLMXML files", "plmxml", "OBJ files", "obj", "CSB files", "csb", "Alias files", "wire", "Sketchup files", "skp", "Pdf files", "pdf", "Prc files", "prc", "3DS files", "3ds", "AutoCAD files", "dwg,dxf" }; try { PiXYZ4UnityWrapper.initialize(); } catch (Exception) { if (EditorUtility.DisplayDialog("Invalid license", "Your license is inexistant or invalid.", "Open license manager", "Close")) { PiXYZLicenseManager.Init(); } return; } string file = EditorUtility.OpenFilePanelWithFilters("Select File", "", extensions); if (file.Length != 0) { isFileNameValid = true; selectedFile = file; } else if (selectedFile.Length == 0) { isFileNameValid = false; } if (EditorPrefs.GetBool("PiXYZ.AutoUpdate", true)) { PiXYZUpdate.checkForUpdate(pixyzImport: this); } }
public static void Init() { PiXYZLicenseManager window = (PiXYZLicenseManager)EditorWindow.GetWindow(typeof(PiXYZLicenseManager), true, "PiXYZ License manager"); window.position = new Rect(10000.0f, 0, 450.0f, 300.0f); //out of screen right window.maxSize = new Vector2(window.position.width, window.position.height); window.minSize = new Vector2(window.position.width, window.position.height); window.CenterOnMainWin(); window.Show(); try { PiXYZ4UnityWrapper.initialize(); } catch (Exception) {} }