2018-08-10 18:41:46 +02:00
|
|
|
using System;
|
2018-09-04 05:40:41 +02:00
|
|
|
using System.Runtime.CompilerServices;
|
2018-08-10 18:41:46 +02:00
|
|
|
|
|
|
|
namespace Godot
|
|
|
|
{
|
|
|
|
public partial class Object
|
|
|
|
{
|
|
|
|
public static bool IsInstanceValid(Object instance)
|
|
|
|
{
|
|
|
|
return instance != null && instance.NativeInstance != IntPtr.Zero;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static WeakRef WeakRef(Object obj)
|
|
|
|
{
|
2018-09-04 05:40:41 +02:00
|
|
|
return godot_icall_Object_weakref(Object.GetPtr(obj));
|
2018-08-10 18:41:46 +02:00
|
|
|
}
|
2018-09-04 05:40:41 +02:00
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
internal extern static WeakRef godot_icall_Object_weakref(IntPtr obj);
|
2018-08-10 18:41:46 +02:00
|
|
|
}
|
|
|
|
}
|