Skip to content

Commit

Permalink
perf: Made all tileset file's generated sprites+tiles hideFlags to Hi…
Browse files Browse the repository at this point in the history
…deInHierarchy to fix ProjectBrowser.Repaint taking a long time to load while large tileset files are collapsed in the project window after a recompile or other various events
  • Loading branch information
Cammin committed May 19, 2024
1 parent 74c1e70 commit 03498b4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ private LDtkArtifactAssetsTileset MakeAndCacheArtifacts(TextureGenerationOutput
{
LDtkProfiler.BeginSample("AddTile");
Sprite spr = output.sprites[i];
spr.hideFlags = HideFlags.HideInHierarchy;
ImportContext.AddObjectToAsset(spr.name, spr);
LDtkProfiler.EndSample();

Expand All @@ -250,7 +251,7 @@ private LDtkArtifactAssetsTileset MakeAndCacheArtifacts(TextureGenerationOutput
newTilesetTile._sprite = spr;
newTilesetTile._type = GetColliderTypeForSprite(spr);
newTilesetTile._tileId = i;
newTilesetTile.hideFlags = HideFlags.None;
newTilesetTile.hideFlags = HideFlags.HideInHierarchy;
if (customData.TryGetValue(i, out string cd))
{
newTilesetTile._customData = cd;
Expand Down

0 comments on commit 03498b4

Please sign in to comment.