Skip to content

Commit 1cc5804

Browse files
belgaardEvergreen
authored andcommitted
Ensure that Lightmapping.UnifiedBaker is set as required, even if the RP core package is not there
1 parent b78f806 commit 1cc5804

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

Packages/com.unity.render-pipelines.core/Editor/PathTracing/LightBakerStrangler.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -81,37 +81,6 @@ internal static void AddContributingInstancesToWorld(World world, in FatInstance
8181
}
8282
}
8383

84-
[InitializeOnLoad]
85-
internal class SetLightmappingUnifiedBaker
86-
{
87-
static SetLightmappingUnifiedBaker()
88-
{
89-
try
90-
{
91-
var lightmappingType = typeof(UnityEditor.Lightmapping);
92-
var unifiedBakerProperty = lightmappingType.GetProperty("UnifiedBaker",
93-
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
94-
95-
if (unifiedBakerProperty != null && unifiedBakerProperty.CanWrite)
96-
{
97-
#if UNIFIED_BAKER
98-
unifiedBakerProperty.SetValue(null, true);
99-
#else
100-
unifiedBakerProperty.SetValue(null, false);
101-
#endif
102-
}
103-
else
104-
{
105-
UnityEngine.Debug.LogWarning("Could not find or access UnifiedBaker property on Lightmapping class");
106-
}
107-
}
108-
catch (System.Exception ex)
109-
{
110-
UnityEngine.Debug.LogError($"Failed to set UnifiedBaker property via reflection: {ex.Message}");
111-
}
112-
}
113-
}
114-
11584
internal class LightBakerStrangler
11685
{
11786
internal enum Result

0 commit comments

Comments
 (0)