I tried to do so, but not succenssful. Now it works like this:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
[DataContract]
public class ChunkData
{...
Yes. I just added [DataContract] and [DataMember]
As I understand it, a sparse array is array that doesn't contain empty elements. In my array there aren't empty elements, each cell of the array contain a type of block. But array has elements of the same type. Is it possibly to sava only...
i replaced xml with json serialization. I addn't compression yet, but size of the file is already smal. But the serialisation takes so long, like in xml. 6 minuts. I need to reduce time to 5 seconds. How to do it?
Now my serialization class looks so:
using System.Collections;
using...
Yes, there are a datas of a chunks (I am debugging heir coordinates). But I vorgt add chunks to WorldData. Now I have this in my xml file:
<?xml version="1.0"?>
<Dictionary>
<item>
<key>
<VectorConventer xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
Now I am already using FileMode.Create. But I vorgot to call function SaveWorld when quitting the game. Now i fixed it and have this in my xml file:
<?xml version="1.0"?>
<Dictionary />
It's no already empty, but no data from the dictionary is there. So the error remained. What am I doing wrong?
Hi all. I am making a game like minecraft. I need to keep the world when the player exits the game. Chunk (it is a place 16 by 16 blocks) and world contain a lot datas, that don't serialize can. so i have created classes WorldData and ChunkData, that contain only serializable varibles. But i...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.