Exemple #1
0
        internal static IntPtr GetPtr(RID instance)
        {
            if (instance == null)
            {
                throw new NullReferenceException($"The instance of type {nameof(RID)} is null.");
            }

            if (instance._disposed)
            {
                throw new ObjectDisposedException(instance.GetType().FullName);
            }

            return(instance.ptr);
        }
Exemple #2
0
        internal static IntPtr GetPtr(RID instance)
        {
            if (instance == null)
            {
                return(IntPtr.Zero);
            }

            if (instance.disposed)
            {
                throw new ObjectDisposedException(instance.GetType().FullName);
            }

            return(instance.ptr);
        }
Exemple #3
0
 public int GetId()
 {
     return(godot_icall_RID_get_id(RID.GetPtr(this)));
 }
Exemple #4
0
 internal static IntPtr GetPtr(RID instance)
 {
     return(instance == null ? IntPtr.Zero : instance.ptr);
 }