|
static byte[] | LoadFromFile (string path) |
|
static void | SaveToFile (string path, byte[] data) |
|
|
JsonReaderSettings | readerSettings |
|
JsonWriterSettings | writerSettings |
|
|
GraphMeta | DeserializeMeta (ZipEntry entry) |
|
void | DeserializeNodeConnections (int index, BinaryReader reader) |
| Deserializes node connections for a specified graph.
|
|
void | DeserializeNodes (int index, BinaryReader reader) |
| Deserializes nodes for a specified graph.
|
|
string | GetString (ZipEntry entry) |
|
byte[] | SerializeMeta () |
| Serialize metadata about alll graphs.
|
|
byte[] | SerializeNodeConnections (int index) |
| Serialize node connections for given graph index.
|
|
byte[] | SerializeNodes (int index) |
|
|
static System.Text.StringBuilder | GetStringBuilder () |
| Returns a cached StringBuilder.
|
|
|
const string | binaryExt = ".binary" |
|
uint | checksum = 0xffffffff |
|
AstarData | data |
|
System.Text.UTF8Encoding | encoding =new System.Text.UTF8Encoding() |
|
NavGraph[] | graphs |
|
const string | jsonExt = ".json" |
|
GraphMeta | meta |
|
SerializeSettings | settings |
|
MemoryStream | str |
|
ZipFile | zip |
|
|
static System.Text.StringBuilder | _stringBuilder = new System.Text.StringBuilder() |
|
void DeserializeExtraInfo |
( |
| ) |
|
Deserializes graph settings.
- Note
- Stored in files named "graph#.json" where # is the graph number.
void DeserializeNodes |
( |
| ) |
|
Deserializes nodes.
Nodes can be saved to enable loading a full scanned graph from memory/file without scanning the graph first.
- Note
- Node info is stored in files named "graph#_nodes.binary" where # is the graph number.
-
Connectivity info is stored in files named "graph#_conns.binary" where # is the graph number.
Deserializes manually created connections.
Connections are created in the A* inspector.
- Note
- Stored in a file named "connections.json".
Node GetNodeWithIndex |
( |
int |
index | ) |
|
Returns node with specified global index.
Graphs must be deserialized or serialized first
static System.Text.StringBuilder GetStringBuilder |
( |
| ) |
|
|
staticprivate |
Returns a cached StringBuilder.
This function only has one string builder cached and should thus only be called from a single thread and should not be called while using an earlier got string builder.
byte [] SerializeNodeConnections |
( |
int |
index | ) |
|
|
private |
Serialize node connections for given graph index.
Connections structure is as follows. Bracket structure has nothing to do with data, just how it is structured:
for every node {
Int32 NodeIndex
Int16 ConnectionCount
for every connection of the node {
Int32 OtherNodeIndex
Int32 ConnectionCost
}
}
The documentation for this class was generated from the following file:
- /Users/aron/Unity/AstarPathfindingGIT/Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs