Skip to content

Commit cc97131

Browse files
Migrate AppDomain.GetAssemblies() in PostProcessing RuntimeUtilities
- RuntimeUtilities.cs: Add conditional compilation (line 1214) - Added using UnityEngine.Assemblies with conditional directive - Maintains backward compatibility with older Unity versions
1 parent 9c18204 commit cc97131

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

com.unity.postprocessing/PostProcessing/Runtime/Utils/RuntimeUtilities.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
using UnityEditor;
1111
#endif
1212

13+
#if UNITY_6000_5_OR_NEWER
14+
using UnityEngine.Assemblies;
15+
#endif
16+
1317
namespace UnityEngine.Rendering.PostProcessing
1418
{
1519
using SceneManagement;
@@ -1211,7 +1215,11 @@ public static IEnumerable<Type> GetAllAssemblyTypes()
12111215
{
12121216
if (m_AssemblyTypes == null)
12131217
{
1218+
#if UNITY_6000_5_OR_NEWER
1219+
m_AssemblyTypes = CurrentAssemblies.GetLoadedAssemblies()
1220+
#else
12141221
m_AssemblyTypes = AppDomain.CurrentDomain.GetAssemblies()
1222+
#endif
12151223
.SelectMany(t =>
12161224
{
12171225
// Ugly hack to handle mis-versioned dlls

0 commit comments

Comments
 (0)