public bool Equals(WeakObject <T> other) { //Don't trip up on nulls if (other == null) { return(false); } if (Data.ObjectIndex == other.Data.ObjectIndex && Data.ObjectSerialNumber == other.Data.ObjectSerialNumber) { return(true); } T thisObject = Object; T otherObject = other.Object; if (thisObject == null && otherObject == null) { return(true); } else if (thisObject == null || otherObject == null) { return(false); } else { return(thisObject.Equals(otherObject)); } }
public override bool Equals(object obj) { WeakObject <T> other = obj as WeakObject <T>; if (other != null) { return(Equals(other)); } return(false); }
public static void ToNative(IntPtr nativeBuffer, int arrayIndex, UnrealObject owner, WeakObject <T> obj) { IntPtr elementPtr = nativeBuffer + arrayIndex * WeakObject <T> .NativeSize; if (obj != null) { obj.ToNative(elementPtr); } else { new WeakObject <T>().ToNative(elementPtr); } }