fix virtual asset leak

This commit is contained in:
2024-04-16 21:55:58 +03:00
parent 641a0ca2e3
commit 0da7f2d93e

View File

@@ -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++;
}