Skip to content

Commit 08d3db3

Browse files
committed
Remove reflection code
See #5, #10
1 parent a22fecc commit 08d3db3

File tree

7 files changed

+1
-146
lines changed

7 files changed

+1
-146
lines changed

UnityAsync/Assets/UnityAsync/AwaitInstructionAwaiter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public bool Evaluate()
4747
// if owner is destroyed, behaves like a UnityEngine.Coroutine, ie:
4848
// "With this object's death, the thread of prophecy is severed. Restore a saved game to restore the
4949
// weave of fate, or persist in the doomed world you have created."
50-
if(!owner.IsAlive())
50+
if(!owner)
5151
return true;
5252

5353
// if not completed, return false to put it back into a queue for next frame

UnityAsync/Assets/UnityAsync/Extensions.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,6 @@ namespace UnityAsync
1111
{
1212
public static class Extensions
1313
{
14-
#if !ENABLE_IL2CPP
15-
16-
static readonly Func<Object, IntPtr> ObjectPtrGetter;
17-
18-
static Extensions() => ReflectionUtility.GenerateFieldGetter("m_CachedPtr", out ObjectPtrGetter);
19-
20-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
21-
internal static bool IsAlive(this Object o) => ObjectPtrGetter(o) != IntPtr.Zero;
22-
23-
#else
24-
25-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
26-
internal static bool IsAlive(this Object o) => o != null;
27-
28-
#endif
29-
3014
/// <summary>
3115
/// Link the <see cref="UnityAsync.IAwaitInstruction"/>'s lifespan to a <see cref="UnityEngine.Object"/> and
3216
/// configure the type of update cycle it should be evaluated on.

UnityAsync/Assets/UnityAsync/Plugins.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.
Binary file not shown.

UnityAsync/Assets/UnityAsync/Plugins/System.Runtime.dll.meta

Lines changed: 0 additions & 34 deletions
This file was deleted.

UnityAsync/Assets/UnityAsync/ReflectionUtility.cs

Lines changed: 0 additions & 83 deletions
This file was deleted.

UnityAsync/Assets/UnityAsync/ReflectionUtility.cs.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)