-Fix: Add TextureCached

This commit is contained in:
yenmoc 2024-05-05 13:47:12 +07:00
parent 2b866f876c
commit 2c652e5abc

View File

@ -17,7 +17,7 @@ namespace Alchemy.Editor
if (tex != null) return tex; if (tex != null) return tex;
tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_current.png", "Editor/Hierarchy/Textures"); tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_current.png", "Editor/Hierarchy/Textures");
TextureCached.Add(nameof(TreeMapCurrent), tex); TextureCached[nameof(TreeMapCurrent)] = tex;
return tex; return tex;
} }
} }
@ -30,7 +30,7 @@ namespace Alchemy.Editor
if (tex != null) return tex; if (tex != null) return tex;
tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_last.png", "Editor/Hierarchy/Textures"); tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_last.png", "Editor/Hierarchy/Textures");
TextureCached.Add(nameof(TreeMapLast), tex); TextureCached[nameof(TreeMapLast)] = tex;
return tex; return tex;
} }
} }
@ -43,7 +43,7 @@ namespace Alchemy.Editor
if (tex != null) return tex; if (tex != null) return tex;
tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_level.png", "Editor/Hierarchy/Textures"); tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_level.png", "Editor/Hierarchy/Textures");
TextureCached.Add(nameof(TreeMapLevel), tex); TextureCached[nameof(TreeMapLevel)] = tex;
return tex; return tex;
} }
} }
@ -56,7 +56,7 @@ namespace Alchemy.Editor
if (tex != null) return tex; if (tex != null) return tex;
tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_line.png", "Editor/Hierarchy/Textures"); tex = AssetHelper.FindAssetWithPath<Texture2D>("tree_map_line.png", "Editor/Hierarchy/Textures");
TextureCached.Add(nameof(TreeMapLine), tex); TextureCached[nameof(TreeMapLine)] = tex;
return tex; return tex;
} }
} }