Пример #1
0
        private object ReadValue(UnityReader reader)
        {
            switch (TypeName.ToLower())
            {
            case "int16": return(reader.ReadInt16());

            case "uint16": return(reader.ReadUInt16());

            case "int32": return(reader.ReadInt32());

            case "uint32": return(reader.ReadUInt32());

            case "int64": return(reader.ReadInt64());

            case "uint64": return(reader.ReadUInt64());

            case "float": return(reader.ReadFloat());

            case "boolean": return(reader.ReadBool());

            case "byte": return(reader.ReadByte());

            case "string":
                int length = reader.ReadInt32();
                return(reader.ReadStringFixed(length));
            }
            return(null);
        }