/// <summary> /// Gets the address of the UEnum for the given enum type /// </summary> /// <param name="type">The type of the enum</param> /// <returns>The address of the UEnum for the given type</returns> public static IntPtr GetEnumAddress(Type type) { UUnrealTypePathAttribute pathAttribute = UnrealTypes.GetPathAttribute(type); if (pathAttribute != null) { if (pathAttribute.IsManagedType) { return(ManagedUnrealTypes.GetEnumAddress(type)); } else { return(GetEnumAddress(pathAttribute.Path)); } } return(IntPtr.Zero); }
/// <summary> /// Loads the address of the UEnum for the given enum type /// </summary> /// <param name="type">The type of the enum</param> /// <returns>The address of the UEnum for the given type</returns> public static IntPtr LoadEnumAddress(Type type) { UUnrealTypePathAttribute pathAttribute = UnrealTypes.GetPathAttribute(type); if (pathAttribute != null) { if (pathAttribute.IsManagedType) { // TODO: Support dynamic loading of managed types return(ManagedUnrealTypes.GetEnumAddress(type)); } else { return(LoadEnumAddress(pathAttribute.Path)); } } return(IntPtr.Zero); }