예제 #1
0
        /// <summary>
        /// Blueprints will always have return values as out values. If there is a single out value treat it
        /// as the return value instead.
        /// </summary>
        internal UProperty GetBlueprintReturnProperty()
        {
            UClass owner           = GetOwnerClass();
            bool   isBlueprintType = owner != null && owner.IsA <UBlueprintGeneratedClass>();

            if (!isBlueprintType)
            {
                return(null);
            }

            if (GetReturnProperty() != null)
            {
                return(null);
            }

            UProperty returnProperty = null;

            foreach (UProperty parameter in GetFields <UProperty>())
            {
                if (!parameter.HasAnyPropertyFlags(EPropertyFlags.Parm))
                {
                    continue;
                }

                if (parameter.HasAnyPropertyFlags(EPropertyFlags.OutParm) &&
                    !parameter.HasAnyPropertyFlags(EPropertyFlags.ReferenceParm))
                {
                    if (returnProperty != null)
                    {
                        return(null);
                    }
                    returnProperty = parameter;
                }
            }
            return(returnProperty);
        }