Beispiel #1
0
        private static void LateAddMetaData(ManagedUnrealReflectionBase field, IntPtr nativeField, string key)
        {
            FName keyName = new FName(key);

            using (FStringUnsafe displayNameUnsafe = new FStringUnsafe())
            {
                Native_UField.GetMetaDataF(nativeField, ref keyName, ref displayNameUnsafe.Array);
                string displayName = displayNameUnsafe.Value;
                if (!string.IsNullOrEmpty(displayName))
                {
                    LateAddMetaData(field.Path, keyName, displayName, false);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Find the metadata value associated with the key
        /// </summary>
        /// <param name="key">The key to lookup in the metadata</param>
        /// <returns>The value associated with the key</returns>
        public string GetMetaData(FName key)
        {
            // WITH_EDITOR || HACK_HEADER_GENERATOR
            if (Native_UField.GetMetaDataF == null)
            {
                return(null);
            }

            using (FStringUnsafe resultUnsafe = new FStringUnsafe())
            {
                Native_UField.GetMetaDataF(Address, ref key, ref resultUnsafe.Array);
                return(resultUnsafe.Value);
            }
        }