(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
@@ -126,7 +126,7 @@ namespace Barotrauma
CanChangeTo.Add(new LocationTypeChange(Identifier, subElement));
break;
case "portrait":
var portrait = new Sprite(subElement);
var portrait = new Sprite(subElement, lazyLoad: true);
if (portrait != null)
{
portraits.Add(portrait);