mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix issue with VS (set textures to null)
This commit is contained in:
parent
abbe7efedc
commit
4afe64f776
@ -158,11 +158,11 @@ namespace NewHorizons.Builder.Body
|
||||
return ImageUtilities.GetTexture(_currentMod, path, wrap: true, linear: linear);
|
||||
}
|
||||
|
||||
private struct Tile
|
||||
private readonly struct Tile
|
||||
{
|
||||
private HeightMapModule.HeightMapTileInfo _info;
|
||||
private string _keyword, _prefix;
|
||||
private Texture2D _texture, _smoothness, _normal;
|
||||
private readonly HeightMapModule.HeightMapTileInfo _info;
|
||||
private readonly string _keyword, _prefix;
|
||||
private readonly Texture2D _texture, _smoothness, _normal;
|
||||
|
||||
public Tile(HeightMapModule.HeightMapTileInfo info, string keyword, string prefix)
|
||||
{
|
||||
@ -177,6 +177,11 @@ namespace NewHorizons.Builder.Body
|
||||
_smoothness = Load(info.smoothnessTile, $"{_prefix}SmoothnessTile", false);
|
||||
_normal = Load(info.normalTile, $"{_prefix}NormalTile", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Visual studio won't compile if you don't do this idk
|
||||
_texture = _smoothness = _normal = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void TryApplyTile(Material material, bool applyTriplanar)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user