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