public static void ExportRobotToUrdf(this UrdfRobot urdfRobot, string exportRootFolder, string exportDestination = "") { #if UNITY_EDITOR UrdfExportPathHandler.SetExportPath(exportRootFolder, exportDestination); urdfRobot.FilePath = Path.Combine(UrdfExportPathHandler.GetExportDestination(), urdfRobot.name + ".urdf"); Robot robot = urdfRobot.ExportRobotData(); if (robot == null) { return; } robot.WriteToUrdf(); Debug.Log(robot.name + " was exported to " + UrdfExportPathHandler.GetExportDestination()); UrdfMaterial.Materials.Clear(); UrdfExportPathHandler.Clear(); AssetDatabase.Refresh(); #else Debug.LogError("URDF Export is only available in Editor."); #endif }