2018-08-10 16:41:46 +00:00
|
|
|
using System;
|
2018-09-04 03:40:41 +00:00
|
|
|
using System.Runtime.CompilerServices;
|
2018-08-10 16:41:46 +00: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 03:40:41 +00:00
|
|
|
return godot_icall_Object_weakref(Object.GetPtr(obj));
|
2018-08-10 16:41:46 +00:00
|
|
|
}
|
2018-09-04 03:40:41 +00:00
|
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
internal extern static WeakRef godot_icall_Object_weakref(IntPtr obj);
|
2018-08-10 16:41:46 +00:00
|
|
|
}
|
|
|
|
}
|