(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
@@ -331,10 +331,10 @@ namespace Barotrauma
switch (subElement.Name.ToString().ToLowerInvariant())
{
case "sprite":
Sprite = new Sprite(subElement);
Sprite = new Sprite(subElement, lazyLoad: true);
break;
case "specularsprite":
SpecularSprite = new Sprite(subElement);
SpecularSprite = new Sprite(subElement, lazyLoad: true);
break;
case "deformablesprite":
DeformableSprite = new DeformableSprite(subElement);