Skip to content

Commit e335f07

Browse files
committed
added compatibility with .Net 3.5
1 parent 3abe8a5 commit e335f07

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Assets/EventVisualizer/Editor/EventsVisualizer.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,16 @@ private static void AddEventCalls(HashSet<EventCall> calls, Component caller, Un
9595
[DidReloadScripts, InitializeOnLoadMethod]
9696
static void RefreshTypesThatCanHoldUnityEvents() {
9797
var sw = System.Diagnostics.Stopwatch.StartNew();
98-
98+
99+
#if NET_4_6
99100
var objects = AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic)
100101
.SelectMany(a => a.GetTypes())
101102
.Where(t => typeof(Component).IsAssignableFrom(t));
103+
#else
104+
var objects = AppDomain.CurrentDomain.GetAssemblies()
105+
.SelectMany(a => a.GetTypes())
106+
.Where(t => typeof(Component).IsAssignableFrom(t));
107+
#endif
102108

103109
foreach (var obj in objects) {
104110
if (RecursivelySearchFields<UnityEventBase>(obj)) {

0 commit comments

Comments
 (0)