Skip to content

Commit

Permalink
fix variable name inside ifdef
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Jan 17, 2024
1 parent 5edbe46 commit d2ac85e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Runtime/Scripts/SceneExporter/ExporterMaterials.cs
Expand Up @@ -544,21 +544,21 @@ private void ExportTextureTransform(TextureInfo def, Material mat, string texNam
string textureSlot,
Material material)
{
const string NORMAL_MAP_FORMAT_XYZ_PROPERTY = "_NormalMapFormatXYZ";
const string normalMapFormatIsXYZ = "_NormalMapFormatXYZ";

var info = new NormalTextureInfo();
TextureExportSettings exportSettings = default;

#if UNITY_2021_1_OR_NEWER
if (material.HasFloat(NORMAL_MAP_FORMAT_XYZ_PROPERTY))
if (material.HasFloat(normalMapFormatIsXYZ))
#else
if (material.HasProperty(normalXYZProperty)
if (material.HasProperty(normalMapFormatIsXYZ)
#if UNITY_2019_1_OR_NEWER
&& CheckForPropertyInShader(material.shader, normalXYZProperty, ShaderPropertyType.Float)
&& CheckForPropertyInShader(material.shader, normalMapFormatIsXYZ, ShaderPropertyType.Float)
#endif
)
#endif
if (material.GetFloat(NORMAL_MAP_FORMAT_XYZ_PROPERTY) == 1)
if (material.GetFloat(normalMapFormatIsXYZ) >= 1)
{
exportSettings.linear = true;
exportSettings.isValid = true;
Expand Down

0 comments on commit d2ac85e

Please sign in to comment.