コード例 #1
0
        private MethodReference GetToNativeMarshaler(ManagedUnrealMarshalerType marshalerType, ManagedUnrealPropertyInfo propertyInfo)
        {
            ManagedUnrealTypeInfoReference arg1 = propertyInfo.GenericArgs.Count >= 1 ? propertyInfo.GenericArgs[0] : null;
            ManagedUnrealTypeInfoReference arg2 = propertyInfo.GenericArgs.Count >= 2 ? propertyInfo.GenericArgs[1] : null;

            return(GetToNativeMarshaler(marshalerType,
                                        propertyInfo.Type.TypeCode, propertyInfo.Type.Path,
                                        arg1 != null ? arg1.TypeCode : EPropertyType.Unknown, arg1 != null ? arg1.Path : null,
                                        arg2 != null ? arg2.TypeCode : EPropertyType.Unknown, arg2 != null ? arg2.Path : null));
        }
コード例 #2
0
 protected void WriteTypeReference(BinaryWriter writer, ManagedUnrealTypeInfoReference obj)
 {
     if (obj == null)
     {
         writer.Write(false);
     }
     else
     {
         writer.Write(true);
         WriteEnum(writer, obj.TypeCode);
         WriteString(writer, obj.Path);
     }
 }
コード例 #3
0
        protected List <ManagedUnrealTypeInfoReference> ReadTypeReferences(BinaryReader reader)
        {
            List <ManagedUnrealTypeInfoReference> result = new List <ManagedUnrealTypeInfoReference>();
            int count = reader.ReadInt32();

            for (int i = 0; i < count; ++i)
            {
                ManagedUnrealTypeInfoReference obj = ReadTypeReference(reader);
                if (obj != null)
                {
                    result.Add(obj);
                }
            }
            return(result);
        }
コード例 #4
0
        protected ManagedUnrealTypeInfoReference ReadTypeReference(BinaryReader reader)
        {
            bool hasObj = reader.ReadBoolean();

            if (hasObj)
            {
                ManagedUnrealTypeInfoReference obj = new ManagedUnrealTypeInfoReference();
                obj.TypeCode = ReadEnum <EPropertyType>(reader);
                obj.Path     = ReadString(reader);
                return(obj);
            }
            else
            {
                return(null);
            }
        }
コード例 #5
0
 private MethodReference GetToNativeMarshaler(ManagedUnrealMarshalerType marshalerType, ManagedUnrealTypeInfoReference typeInfo)
 {
     return(GetToNativeMarshaler(marshalerType, typeInfo.TypeCode, typeInfo.Path));
 }