(d041dfb1b) Implemented lazy sprite loading (= the texture isn't loaded until it's accessed for the first time). Atm only used in LevelObjectPrefabs and location portraits.

This commit is contained in:
Joonas Rikkonen
2019-04-03 16:25:02 +03:00
parent 4685121eee
commit 92713cf587
8 changed files with 68 additions and 18 deletions
@@ -76,6 +76,9 @@ namespace Barotrauma
partial void InitProjSpecific()
{
Prefab.Sprite?.EnsureLazyLoaded();
Prefab.SpecularSprite?.EnsureLazyLoaded();
CurrentSwingAmount = Prefab.SwingAmountRad;
CurrentScaleOscillation = Prefab.ScaleOscillation;