Beispiel #1
0
        /// <summary>
        /// Returns true if this objects class implements the given IInterface derived type
        /// (call this on UObject instances; if you are working with a UClass call ImplementsInterface() instead).<para/>
        /// This is the equivalent of UKismetSystemLibrary::DoesImplementInterface().
        /// This is also the same as obj.GetClass().ImplementsInterface().
        /// </summary>
        /// <typeparam name="T">The IInterface derived type</typeparam>
        /// <returns>True if  this objects class implements the given IInterface derived type</returns>
        public bool DoesImplementInterface <T>() where T : IInterface
        {
            IntPtr interfaceClass = UClass.GetInterfaceClassAddress <T>();

            if (interfaceClass != IntPtr.Zero && Native_UClass.GetClassFlags(interfaceClass).HasFlag(EClassFlags.Interface))
            {
                return(Native_UClass.ImplementsInterface(Native_UObjectBase.GetClass(Address), interfaceClass));
            }
            return(false);
        }
Beispiel #2
0
 /// <summary>
 /// Gets the class flags.
 /// </summary>
 /// <returns>The class flags.</returns>
 public EClassFlags GetClassFlags()
 {
     return(Native_UClass.GetClassFlags(Address));
 }