Skip to content

Commit 28212a9

Browse files
authored
Fix check for available texture replacements (#15)
This would skip replacing textures if there were zero scene specific textures or zero regular textures. It should really be skipping only if both are zero.
1 parent b157bb9 commit 28212a9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
9+
## Fixed
10+
* Fixed a bug where HUDReplacer would not replace any textures if there were
11+
zero scene-specific replacements or zero general replacements.
12+
913
## 1.3.2
1014
### Fixed
1115
* Fixed a bug where a replacement with an explicitly specified size would not

src/HUDReplacer/HUDReplacer.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,9 @@ public void Awake()
121121
if (Images is null)
122122
LoadTextures();
123123

124-
if (Images.Count != 0 && SceneImages.Count != 0)
125-
{
126-
Debug.Log("HUDReplacer: Replacing textures...");
127-
ReplaceTextures();
128-
Debug.Log("HUDReplacer: Textures have been replaced!");
129-
}
124+
Debug.Log("HUDReplacer: Replacing textures...");
125+
ReplaceTextures();
126+
Debug.Log("HUDReplacer: Textures have been replaced!");
130127

131128
LoadHUDColors();
132129
}

0 commit comments

Comments
 (0)