public virtual bool TryGetValue(UObject worldContextObject, out T value) { IntPtr world = Native_UObject.GetWorld(worldContextObject.Address); if (worldTypeFlags == 0) { if (values.TryGetValue(world, out value)) { return(true); } } else if (world != IntPtr.Zero) { int worldType = (1 << (int)Native_UWorld.Get_WorldType(world)); if ((worldTypeFlags & worldType) == worldType) { if (values.TryGetValue(world, out value)) { return(true); } } } value = default(T); return(false); }
public virtual bool HasValue(UObject worldContextObject) { IntPtr world = Native_UObject.GetWorld(worldContextObject.Address); if (worldTypeFlags == 0) { return(values.ContainsKey(world)); } else if (world != IntPtr.Zero) { int worldType = (1 << (int)Native_UWorld.Get_WorldType(world)); if ((worldTypeFlags & worldType) == worldType) { return(values.ContainsKey(world)); } } return(false); }
public virtual bool Set(UObject worldContextObject, T value) { IntPtr world = Native_UObject.GetWorld(worldContextObject.Address); if (worldTypeFlags == 0) { values[world] = value; return(true); } else if (world != IntPtr.Zero) { int worldType = (1 << (int)Native_UWorld.Get_WorldType(world)); if ((worldTypeFlags & worldType) == worldType) { values[world] = value; return(true); } } return(false); }