fix virtual asset leak
This commit is contained in:
@@ -325,7 +325,7 @@ public class Q3MapImporter : Script
|
||||
Editor.Instance.PlayModeBeginning -= OnEditorPlayModeStart;
|
||||
Editor.Instance.PlayModeEnd -= OnEditorPlayModeEnd;
|
||||
|
||||
//UnloadMap();
|
||||
UnloadMap();
|
||||
}
|
||||
#endif
|
||||
public override void OnStart()
|
||||
@@ -728,6 +728,8 @@ public class Q3MapImporter : Script
|
||||
mesh.normals.Add(normal);
|
||||
}
|
||||
|
||||
if (!LoadCollidersOnly)
|
||||
{
|
||||
geom.model = Content.CreateVirtualAsset<Model>();
|
||||
geom.model.SetupLODs(new[] { geom.meshes.Length });
|
||||
geom.model.SetupMaterialSlots(geom.meshes.Length);
|
||||
@@ -746,6 +748,7 @@ public class Q3MapImporter : Script
|
||||
|
||||
//Not supported yet, should be done here
|
||||
//geom.model.GenerateSDF();
|
||||
}
|
||||
|
||||
brushIndex++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user