Sirenix.Serialization
Provides basic functionality and overridable abstract methods for implementing a data reader.
If you inherit this class, it is VERY IMPORTANT that you implement each abstract method to the *exact* specifications the documentation specifies.
Initializes a new instance of the class.
The base stream of the reader.
The deserialization context to use.
The stream or context is null.
Cannot read from stream.
Gets the current node id. If this is less than zero, the current node has no id.
The current node id.
Gets the current node depth. In other words, the current count of the node stack.
The current node depth.
Gets the name of the current node.
The name of the current node.
Gets or sets the base stream of the reader.
The base stream of the reader.
value
Cannot read from stream
Gets the deserialization context.
The deserialization context.
Tries to enter a node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current node.
The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name.
true if entering a node succeeded, otherwise false
Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the current node.
true if the method exited a node, false if it reached the end of the stream.
Tries to enters an array node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current array node.
The length of the array that was entered.
true if an array was entered, otherwise false
Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the exited array node.
true if the method exited an array, false if it reached the end of the stream.
Reads a primitive array value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The element type of the primitive array. Valid element types can be determined using .
The resulting primitive array.
true if reading a primitive array succeeded, otherwise false
Peeks ahead and returns the type of the next entry in the stream.
The name of the next entry, if it has one.
The type of the next entry.
Reads an internal reference id. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The internal reference id.
true if reading the value succeeded, otherwise false
Reads an external reference index. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference index.
true if reading the value succeeded, otherwise false
Reads an external reference guid. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference guid.
true if reading the value succeeded, otherwise false
Reads an external reference string. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference string.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the string of the entry is longer than 1 character, the first character of the string will be taken as the result.
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a null value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
true if reading the value succeeded, otherwise false
Skips the next entry value, unless it is an or an . If the next entry value is an or an , all of its contents will be processed, deserialized and registered in the deserialization context, so that internal reference values are not lost to entries further down the stream.
Disposes all resources and streams kept by the data reader.
Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same reader is used to deserialize several different, unrelated values.
Gets a dump of the data being read by the writer. The format of this dump varies, but should be useful for debugging purposes.
Peeks the current entry.
The peeked entry.
Consumes the current entry, and reads to the next one.
The next entry.
Implements functionality that is shared by both data readers and data writers.
Gets or sets the context's or writer's serialization binder.
The reader's or writer's serialization binder.
Gets a value indicating whether the reader or writer is in an array node.
true if the reader or writer is in an array node; otherwise, false.
Gets the current node depth. In other words, the current count of the node stack.
The current node depth.
Gets the current nodes array. The amount of nodes contained in it is stored in the property. The remainder of the array's length is buffer space.
The current node array.
Gets the current node, or if there is no current node.
The current node.
Pushes a node onto the node stack.
The node to push.
Pushes a node with the given name, id and type onto the node stack.
The name of the node.
The id of the node.
The type of the node.
Pushes an array node onto the node stack. This uses values from the current node to provide extra info about the array node.
Pops the current node off of the node stack.
The name of the node to pop.
There are no nodes to pop.
or
Tried to pop node with given name, but the current node's name was different.
Pops the current node if the current node is an array node.
Provides basic functionality and overridable abstract methods for implementing a data writer.
If you inherit this class, it is VERY IMPORTANT that you implement each abstract method to the *exact* specifications the documentation specifies.
Initializes a new instance of the class.
The base stream of the writer.
The serialization context to use.
The stream or context is null.
Cannot write to the stream.
Gets or sets the base stream of the writer.
The base stream of the writer.
value
Cannot write to stream
Gets the serialization context.
The serialization context.
Flushes everything that has been written so far to the writer's base stream.
Writes the beginning of a reference node.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the reference node.
The type of the reference node. If null, no type metadata will be written.
The id of the reference node. This id is acquired by calling .
Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the struct node.
The type of the struct node. If null, no type metadata will be written.
Ends the current node with the given name. If the current node has another name, an is thrown.
The name of the node to end. This has to be the name of the current node.
Begins an array node of the given length.
The length of the array to come.
Ends the current array node, if the current node is an array node.
Writes a primitive array to the stream.
The element type of the primitive array. Valid element types can be determined using .
The primitive array to write.
Writes a null value to the stream.
The name of the value. If this is null, no name will be written.
Writes an internal reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external index reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external guid reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external string reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Disposes all resources and streams kept by the data writer.
Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same writer is used to serialize several different, unrelated values.
Gets a dump of the data currently written by the writer. The format of this dump varies, but should be useful for debugging purposes.
Reads data from a stream that has been written by a .
Initializes a new instance of the class.
The base stream of the reader.
The deserialization context to use.
Disposes all resources kept by the data reader, except the stream, which can be reused later.
Peeks ahead and returns the type of the next entry in the stream.
The name of the next entry, if it has one.
The type of the next entry.
Tries to enters an array node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current array node.
The length of the array that was entered.
true if an array was entered, otherwise false
Tries to enter a node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current node.
The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name.
true if entering a node succeeded, otherwise false
Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the exited array node.
true if the method exited an array, false if it reached the end of the stream.
Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the current node.
true if the method exited a node, false if it reached the end of the stream.
Reads a primitive array value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The element type of the primitive array. Valid element types can be determined using .
The resulting primitive array.
true if reading a primitive array succeeded, otherwise false
Type + typeof(T).Name + is not a valid primitive array type.
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the string of the entry is longer than 1 character, the first character of the string will be taken as the result.
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an external reference guid. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference guid.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an external reference index. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference index.
true if reading the value succeeded, otherwise false
Reads an external reference string. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference string.
true if reading the value succeeded, otherwise false
Reads a null value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
true if reading the value succeeded, otherwise false
Reads an internal reference id. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The internal reference id.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same reader is used to deserialize several different, unrelated values.
Peeks the current entry.
The peeked entry.
Consumes the current entry, and reads to the next one.
The next entry.
Writes data to a stream that can be read by a .
Initializes a new instance of the class.
The base stream of the writer.
The serialization context to use.
Begins an array node of the given length.
The length of the array to come.
Writes the beginning of a reference node.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the reference node.
The type of the reference node. If null, no type metadata will be written.
The id of the reference node. This id is acquired by calling .
Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the struct node.
The type of the struct node. If null, no type metadata will be written.
Disposes all resources kept by the data writer, except the stream, which can be reused later.
Ends the current array node, if the current node is an array node.
Ends the current node with the given name. If the current node has another name, an is thrown.
The name of the node to end. This has to be the name of the current node.
Writes a primitive array to the stream.
The element type of the primitive array. Valid element types can be determined using .
The primitive array to write.
Type + typeof(T).Name + is not a valid primitive array type.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external guid reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external index reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external string reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a null value to the stream.
The name of the value. If this is null, no name will be written.
Writes an internal reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same writer is used to serialize several different, unrelated values.
Entry types in the binary format written by .
An invalid entry.
Entry denoting a named start of a reference node.
Entry denoting an unnamed start of a reference node.
Entry denoting a named start of a struct node.
Entry denoting an unnamed start of a struct node.
Entry denoting an end of node.
Entry denoting the start of an array.
Entry denoting the end of an array.
Entry denoting a primitive array.
Entry denoting a named internal reference.
Entry denoting an unnamed internal reference.
Entry denoting a named external reference by index.
Entry denoting an unnamed external reference by index.
Entry denoting a named external reference by guid.
Entry denoting an unnamed external reference by guid.
Entry denoting a named sbyte.
Entry denoting an unnamed sbyte.
Entry denoting a named byte.
Entry denoting an unnamed byte.
Entry denoting a named short.
Entry denoting an unnamed short.
Entry denoting a named ushort.
Entry denoting an unnamed ushort.
Entry denoting a named int.
Entry denoting an unnamed int.
Entry denoting a named uint.
Entry denoting an unnamed uint.
Entry denoting a named long.
Entry denoting an unnamed long.
Entry denoting a named ulong.
Entry denoting an unnamed ulong.
Entry denoting a named float.
Entry denoting an unnamed float.
Entry denoting a named double.
Entry denoting an unnamed double.
Entry denoting a named decimal.
Entry denoting an unnamed decimal.
Entry denoting a named char.
Entry denoting an unnamed char.
Entry denoting a named string.
Entry denoting an unnamed string.
Entry denoting a named guid.
Entry denoting an unnamed guid.
Entry denoting a named boolean.
Entry denoting an unnamed boolean.
Entry denoting a named null.
Entry denoting an unnamed null.
Entry denoting a type name.
Entry denoting a type id.
Entry denoting that the end of the stream has been reached.
Entry denoting a named external reference by string.
Entry denoting an unnamed external reference by string.
Provides a set of methods for reading data stored in a format written by a corresponding class.
If you implement this interface, it is VERY IMPORTANT that you implement each method to the *exact* specifications the documentation specifies.
It is strongly recommended to inherit from the class if you wish to implement a new data reader.
Gets or sets the reader's serialization binder.
The reader's serialization binder.
Gets or sets the base stream of the reader.
The base stream of the reader.
Gets a value indicating whether the reader is in an array node.
true if the reader is in an array node; otherwise, false.
Gets the name of the current node.
The name of the current node.
Gets the current node id. If this is less than zero, the current node has no id.
The current node id.
Gets the current node depth. In other words, the current count of the node stack.
The current node depth.
Gets the deserialization context.
The deserialization context.
Gets a dump of the data being read by the writer. The format of this dump varies, but should be useful for debugging purposes.
Tries to enter a node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current node.
The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name.
true if entering a node succeeded, otherwise false
Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the current node.
true if the method exited a node, false if it reached the end of the stream.
Tries to enters an array node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current array node.
The length of the array that was entered.
true if an array was entered, otherwise false
Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the exited array node.
true if the method exited an array, false if it reached the end of the stream.
Reads a primitive array value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The element type of the primitive array. Valid element types can be determined using .
The resulting primitive array.
true if reading a primitive array succeeded, otherwise false
Peeks ahead and returns the type of the next entry in the stream.
The name of the next entry, if it has one.
The type of the next entry.
Reads an internal reference id. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The internal reference id.
true if reading the value succeeded, otherwise false
Reads an external reference index. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference index.
true if reading the value succeeded, otherwise false
Reads an external reference guid. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference guid.
true if reading the value succeeded, otherwise false
Reads an external reference string. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference string.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the string of the entry is longer than 1 character, the first character of the string will be taken as the result.
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a null value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
true if reading the value succeeded, otherwise false
Skips the next entry value, unless it is an or an . If the next entry value is an or an , all of its contents will be processed, deserialized and registered in the deserialization context, so that internal reference values are not lost to entries further down the stream.
Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same reader is used to deserialize several different, unrelated values.
Provides a set of methods for reading data stored in a format that can be read by a corresponding class.
If you implement this interface, it is VERY IMPORTANT that you implement each method to the *exact* specifications the documentation specifies.
It is strongly recommended to inherit from the class if you wish to implement a new data writer.
Gets or sets the reader's serialization binder.
The reader's serialization binder.
Gets or sets the base stream of the writer.
The base stream of the writer.
Gets a value indicating whether the writer is in an array node.
true if the writer is in an array node; otherwise, false.
Gets the serialization context.
The serialization context.
Gets a dump of the data currently written by the writer. The format of this dump varies, but should be useful for debugging purposes.
Flushes everything that has been written so far to the writer's base stream.
Writes the beginning of a reference node.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the reference node.
The type of the reference node. If null, no type metadata will be written.
The id of the reference node. This id is acquired by calling .
Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the struct node.
The type of the struct node. If null, no type metadata will be written.
Ends the current node with the given name. If the current node has another name, an is thrown.
The name of the node to end. This has to be the name of the current node.
Begins an array node of the given length.
The length of the array to come.
Ends the current array node, if the current node is an array node.
Writes a primitive array to the stream.
The element type of the primitive array. Valid element types can be determined using .
The primitive array to write.
Writes a null value to the stream.
The name of the value. If this is null, no name will be written.
Writes an internal reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external index reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external guid reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external string reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same writer is used to serialize several different, unrelated values.
Contains various string constants used by the , and classes.
The named of a node id entry.
The name of a type entry.
The name of a regular array length entry.
The name of a primitive array length entry.
The name of a regular array content entry.
The name of a primitive array content entry.
The beginning of the content of an internal reference entry.
The beginning of the content of an external reference by index entry.
The beginning of the content of an external reference by guid entry.
The beginning of the content of an external reference by string entry. This is an old entry using an invalid data format where the ref string is dumped inline without escaping.
The beginning of the content of an external reference by string entry. This is a new entry using the valid format where the ref string is written as an escaped string.
Reads json data from a stream that has been written by a .
Initializes a new instance of the class.
The base stream of the reader.
The deserialization context to use.
Gets or sets the base stream of the reader.
The base stream of the reader.
Disposes all resources kept by the data reader, except the stream, which can be reused later.
Peeks ahead and returns the type of the next entry in the stream.
The name of the next entry, if it has one.
The type of the next entry.
Tries to enter a node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current node.
The type of the node. This value will be null if there was no metadata, or if the reader's serialization binder failed to resolve the type name.
true if entering a node succeeded, otherwise false
Exits the current node. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the current node.
true if the method exited a node, false if it reached the end of the stream.
Tries to enters an array node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current array node.
The length of the array that was entered.
true if an array was entered, otherwise false
Exits the closest array. This method will keep skipping entries using until an is reached, or the end of the stream is reached.
This call MUST have been preceded by a corresponding call to .
This call will change the values of the , , and to the correct values for the node that was prior to the exited array node.
true if the method exited an array, false if it reached the end of the stream.
Reads a primitive array value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The element type of the primitive array. Valid element types can be determined using .
The resulting primitive array.
true if reading a primitive array succeeded, otherwise false
Type + typeof(T).Name + is not a valid primitive array type.
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an internal reference id. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The internal reference id.
true if reading the value succeeded, otherwise false
Reads an external reference index. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference index.
true if reading the value succeeded, otherwise false
Reads an external reference guid. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference guid.
true if reading the value succeeded, otherwise false
Reads an external reference string. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The external reference string.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the string of the entry is longer than 1 character, the first character of the string will be taken as the result.
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads an value. This call will succeed if the next entry is an .
If the value of the stored integer is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a value. This call will succeed if the next entry is an or an .
If the stored integer or floating point value is smaller than or larger than , the result will be default().
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The value that has been read.
true if reading the value succeeded, otherwise false
Reads a null value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
true if reading the value succeeded, otherwise false
Tells the reader that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same reader is used to deserialize several different, unrelated values.
Peeks the current entry.
The peeked entry.
Consumes the current entry, and reads to the next one.
The next entry.
Writes json data to a stream that can be read by a .
Initializes a new instance of the class.
The base stream of the writer.
The serialization context to use.>
Whether the json should be packed, or formatted as human-readable.
Gets or sets a value indicating whether the json should be packed, or formatted as human-readable.
true if the json should be formatted as human-readable; otherwise, false.
Whether to enable an optimization that ensures any given type name is only written once into the json stream, and thereafter kept track of by ID.
Enable the "just started" flag, causing the writer to start a new "base" json object container.
Flushes everything that has been written so far to the writer's base stream.
Writes the beginning of a reference node.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the reference node.
The type of the reference node. If null, no type metadata will be written.
The id of the reference node. This id is acquired by calling .
Begins a struct/value type node. This is essentially the same as a reference node, except it has no internal reference id.
This call MUST eventually be followed by a corresponding call to , with the same name.
The name of the struct node.
The type of the struct node. If null, no type metadata will be written.
Ends the current node with the given name. If the current node has another name, an is thrown.
The name of the node to end. This has to be the name of the current node.
Begins an array node of the given length.
The length of the array to come.
Ends the current array node, if the current node is an array node.
Writes a primitive array to the stream.
The element type of the primitive array. Valid element types can be determined using .
The primitive array to write.
Type + typeof(T).Name + is not a valid primitive array type.
array
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a null value to the stream.
The name of the value. If this is null, no name will be written.
Writes an internal reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes a value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external index reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external guid reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an external string reference to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Writes an value to the stream.
The name of the value. If this is null, no name will be written.
The value to write.
Disposes all resources kept by the data writer, except the stream, which can be reused later.
Tells the writer that a new serialization session is about to begin, and that it should clear all cached values left over from any prior serialization sessions.
This method is only relevant when the same writer is used to serialize several different, unrelated values.
Parses json entries from a stream.
The current deserialization context used by the text reader.
Initializes a new instance of the class.
The stream to parse from.
The deserialization context to use.
The stream is null.
Cannot read from the stream.
Resets the reader instance's currently peeked char and emergency playback queue.
Disposes all resources kept by the text reader, except the stream, which can be reused later.
Reads to (but not past) the beginning of the next json entry, and returns the entry name, contents and type.
The name of the entry that was parsed.
The content of the entry that was parsed.
The type of the entry that was parsed.
A serialization node as used by the format.
The name of the node.
The entry type of the node.
The data contained in the node. Depending on the entry type and name, as well as nodes encountered prior to this one, the format can vary wildly.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Tries to enters an array node. This will succeed if the next entry is an .
This call MUST (eventually) be followed by a corresponding call to
This call will change the values of the , , and properties to the correct values for the current array node.
The length of the array that was entered.
true if an array was entered, otherwise false
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Reads a primitive array value. This call will succeed if the next entry is an .
If the call fails (and returns false), it will skip the current entry value, unless that entry is an or an .
The element type of the primitive array. Valid element types can be determined using .
The resulting primitive array.
true if reading a primitive array succeeded, otherwise false
Type + typeof(T).Name + is not a valid primitive array type.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Peeks the current entry.
The peeked entry.
Consumes the current entry, and reads to the next one.
The next entry.
Shared config class for and .
The string to use to separate node id's from their names.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Begins an array node of the given length.
The length of the array to come.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Utility class for locating and caching formatters for all non-primitive types.
Editor-only event that fires whenever an emittable formatter has been located.
This event is used by the AOT formatter pre-emitter to locate types that need to have formatters pre-emitted.
Editor-only event that fires whenever a formatter has been located.
This event is invoked before everything else when a formatter is being resolved for a given type. If any invoked delegate returns a valid formatter, that formatter is used and the resolve process stops there.
This can be used to hook into and extend the serialization system's formatter resolution logic.
Gets a formatter for the type .
The type to get a formatter for.
The serialization policy to use if a formatter has to be emitted. If null, is used.
A formatter for the type .
Gets a formatter for a given type.
The type to get a formatter for.
The serialization policy to use if a formatter has to be emitted. If null, is used.
A formatter for the given type.
The type argument is null.
Gets a formatter for a given type.
The type to get a formatter for.
The serialization policy to use if a formatter has to be emitted. If null, is used.
Whether to allow the use of weak fallback formatters which do not implement the strongly typed , but which conversely do not need to have had AOT support generated.
A formatter for the given type.
The type argument is null.
Formatter for all non-primitive one-dimensional arrays.
The element type of the formatted array.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom formatter for the type .
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Provides common functionality for serializing and deserializing values of type , and provides automatic support for the following common serialization conventions:
, , , , and .
The type which can be serialized and deserialized by the formatter.
The on serializing callbacks for type .
The on serialized callbacks for type .
The on deserializing callbacks for type .
The on deserialized callbacks for type .
Whether the serialized value is a value type.
Gets the type that the formatter can serialize.
The type that the formatter can serialize.
Serializes a value using a specified .
The value to serialize.
The writer to use.
Deserializes a value using a specified .
The reader to use.
The deserialized value.
Deserializes a value of type using a specified .
The reader to use.
The deserialized value.
Serializes a value of type using a specified .
The value to serialize.
The writer to use.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins.
You will have to call and immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Registers the given object reference in the deserialization context.
NOTE that this method only does anything if is not a value type.
The value to register.
The reader which is currently being used.
Invokes all methods on the object with the [OnDeserializing] attribute.
WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization.
The value to invoke the callbacks on.
The deserialization context.
Invokes all methods on the object with the [OnDeserializing] attribute.
WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization.
The value to invoke the callbacks on.
The deserialization context.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Provides common functionality for serializing and deserializing weakly typed values of a given type, and provides automatic support for the following common serialization conventions:
, , , , and .
Serializes a value using a specified .
The value to serialize.
The writer to use.
Deserializes a value using a specified .
The reader to use.
The deserialized value.
Registers the given object reference in the deserialization context.
NOTE that this method only does anything if is not a value type.
The value to register.
The reader which is currently being used.
Invokes all methods on the object with the [OnDeserializing] attribute.
WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization.
The value to invoke the callbacks on.
The deserialization context.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Formatter for all delegate types.
This formatter can handle anything but delegates for dynamic methods.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins.
You will have to call and immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Emergency hack class to support serialization of types derived from dictionary
Returns null.
A value of null.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom generic formatter for the generic type definition .
The type of the dictionary key.
The type of the dictionary value.
Creates a new instance of .
Returns null.
A value of null.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom Odin serialization formatter for .
Type of primary key.
Type of secondary key.
Type of value.
Creates a new instance of .
Returns null.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides an easy way of implementing custom formatters.
The type which can be serialized and deserialized by the formatter.
Reads through all entries in the current node one at a time, and calls for each entry.
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Calls directly.
The value to serialize.
The writer to serialize with.
Reads a data entry into the value denoted by the entry name.
The value to read into.
The name of the entry.
The type of the entry.
The reader currently used for deserialization.
Write the serialized values of a value of type .
The value to serialize.
The writer currently used for serialization.
Indicates that this formatter type has been emitted. Never put this on a type!
A formatter for empty types. It writes no data, and skips all data that is to be read, deserializing a "default" value.
Skips the entry to read.
Does nothing at all.
Utility class for emitting formatters using the namespace.
NOTE: Some platforms do not support emitting. Check whether you can emit on the current platform using .
Used for generating unique formatter helper type names.
The name of the pre-generated assembly that contains pre-emitted formatters for use on AOT platforms where emitting is not supported. Note that this assembly is not always present.
The name of the runtime-generated assembly that contains runtime-emitted formatters for use on non-AOT platforms where emitting is supported. Note that this assembly is not always present.
Base type for all AOT-emitted formatters.
Shortcut class that makes it easier to emit empty AOT formatters.
Skips the entry to read.
Does nothing at all.
Gets an emitted formatter for a given type.
NOTE: Some platforms do not support emitting. On such platforms, this method logs an error and returns null. Check whether you can emit on the current platform using .
The type to emit a formatter for.
The serialization policy to use to determine which members the emitted formatter should serialize. If null, is used.
The type of the emitted formatter.
The type argument is null.
Emits a formatter for a given type into a given module builder, using a given serialization policy to determine which members to serialize.
Type to create a formatter for.
The module builder to emit a formatter into.
The serialization policy to use for creating the formatter.
The fully constructed, emitted formatter type.
Utility class for the class.
Determines whether the specified type can be formatted by a .
The following criteria are checked: type implements , type is not abstract, type is not a generic type definition, type is not an interface, type has a public parameterless constructor.
The collection type to check.
The element type of the collection.
true if the type can be formatted by a , otherwise false
The type argument is null.
Formatter for all eligible types that implement the interface , and which have no other formatters specified.
Eligibility for formatting by this class is determined by the method.
The type of the collection.
The type of the element.
Creates a new instance of .
Gets a new object of type .
A new object of type .
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Gets a new object of type .
A new object of type .
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom generic formatter for the generic type definition .
The element type of the formatted list.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Serializes and deserializes a given type.
NOTE that if you are implementing a custom formatter and registering it using the , it is not enough to implement - you have to implement .
Gets the type that the formatter can serialize.
The type that the formatter can serialize.
Serializes a value using a specified .
The value to serialize.
The writer to use.
Deserializes a value using a specified .
The reader to use.
The deserialized value.
Serializes and deserializes a given type T.
The type which can be serialized and deserialized by the formatter.
Serializes a value of type using a specified .
The value to serialize.
The writer to use.
Deserializes a value of type using a specified .
The reader to use.
The deserialized value.
Custom generic formatter for the generic type definition .
The type of the key.
The type of the value.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Custom generic formatter for the generic type definition .
The element type of the formatted list.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom formatter for MethodInfo, since Unity Mono's MethodInfo ISerializable implementation will often crash if the method no longer exists upon deserialization.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins.
You will have to call and immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Minimal baseline formatter. Doesn't come with all the bells and whistles of any of the other BaseFormatter classes.
Common serialization conventions aren't automatically supported, and common deserialization callbacks are not automatically invoked.
The type which can be serialized and deserialized by the formatter.
Whether the serialized value is a value type.
Gets the type that the formatter can serialize.
The type that the formatter can serialize.
Deserializes a value of type using a specified .
The reader to use.
The deserialized value.
Serializes a value of type using a specified .
The value to serialize.
The writer to use.
Serializes a value using a specified .
The value to serialize.
The writer to use.
Deserializes a value using a specified .
The reader to use.
The deserialized value.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered.
You will have to call immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Registers the given object reference in the deserialization context.
NOTE that this method only does anything if is not a value type.
The value to register.
The reader which is currently being used.
Whether the serialized value is a value type.
Gets the type that the formatter can serialize.
The type that the formatter can serialize.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered.
You will have to call immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Registers the given object reference in the deserialization context.
NOTE that this method only does anything if the serialized type is not a value type.
The value to register.
The reader which is currently being used.
Formatter for all arrays with more than one dimension.
The type of the formatted array.
The element type of the formatted array.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Formatter for all types.
The type that is nullable.
Creates a new instance of .
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Formatter for all primitive one-dimensional arrays.
The element type of the formatted array. This type must be an eligible primitive array type, as determined by .
Returns null.
A null value.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Returns null.
A null value.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom generic formatter for the generic type definition .
The element type of the formatted queue.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Final fallback formatter for all types which have no other formatters. This formatter relies on reflection to work, and is thus comparatively slow and creates more garbage than a custom formatter.
The type which can be serialized and deserialized by the formatter.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Formatter for types that implement the interface.
Calls on the value to deserialize.
Calls on the value to deserialize.
Calls on the value to deserialize.
Calls on the value to deserialize.
Formatter for all types that implement the ISerializable interface.
The type which can be serialized and deserialized by the formatter.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins.
You will have to call and immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Creates and reads into a instance using a given reader and context.
The reader to use.
The which was read.
Writes the given using the given writer.
The to write.
The writer to use.
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins.
You will have to call and immediately after creating the object yourself during deserialization.
An uninitialized object of type .
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom generic formatter for the generic type definition and types derived from it.
The element type of the formatted stack.
Returns null.
A null value.
Provides the actual implementation for deserializing a value of type .
The uninitialized value to serialize into. This value will have been created earlier using .
The reader to deserialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Provides the actual implementation for serializing a value of type .
The value to serialize.
The writer to serialize with.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Formatter for the type which uses the reader/writer's to bind types.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Returns null.
null.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Applying this attribute to a type indicates that in the case where, when expecting to deserialize an instance of the type
or any of its derived types, but encountering an incompatible, uncastable type in the data being read, the serializer
should attempt to deserialize an instance of the expected type using the stored, possibly invalid data.
This is equivalent to the option, expect type-specific instead
of global.
Use this attribute to specify that a type that implements the
interface should *always* format itself regardless of other formatters being specified.
This means that the interface will be used to format all types derived from the type that
is decorated with this attribute, regardless of custom formatters for the derived types.
This class gathers info about the current architecture for the purpose of determinining
the unaligned read/write capabilities that we have to work with.
This will be false on some ARM architectures, such as ARMv7.
In these cases, we will have to perform slower but safer int-by-int read/writes of data.
Since this value will never change at runtime, performance hits from checking this
everywhere should hopefully be negligible, since branch prediction from speculative
execution will always predict it correctly.
Provides a way of claiming and releasing cached array buffers.
The element type of the array to buffer.
Gets the total element count of the buffered array. This will always be a power of two.
The total element count of the buffered array.
Cannot access a buffer while it is freed.
Gets the buffered array.
The buffered array.
Cannot access a buffer while it is freed.
Gets a value indicating whether this buffer is free.
true if this buffer is free; otherwise, false.
Claims a buffer with the specified minimum capacity. Note: buffers always have a capacity equal to or larger than 256.
The minimum capacity.
A buffer which has a capacity equal to or larger than the specified minimum capacity.
Requested size of buffer must be larger than 0.
Frees the specified buffer.
The buffer to free.
The buffer argument is null.
Frees this buffer.
Frees this buffer.
Attribute indicating that a class which implements the interface somewhere in its hierarchy is a custom formatter for the type T.
The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen.
Initializes a new instance of the class with priority 0.
Initializes a new instance of the class.
The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen.
Attribute indicating that a generic type definition class which implements the interface somewhere in its hierarchy is a custom formatter for *any variation* of the generic type definition T.
The formatter's generic type parameters are mapped onto the serialized type's generic type parameters.
For example, implements , where T is .
The generic type definition of the serialized type.
Initializes a new instance of the class.
The generic type definition of the serialized type.
The priority of the formatter. Of all the available custom formatters, the formatter with the highest priority is always chosen.
was null.
The type given in is not a generic type definition.
Helper class for quickly and easily implementing the interface.
Initializes a new instance of the class.
The policy ID.
if set to true non serializable types will be allowed.
The delegate to use for determining whether members should be serialized.
The id argument or the shouldSerializeFunc argument was null.
Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize it can be recovered without knowing the policy at runtime. This ID should preferably be unique.
The identifier of the policy.
Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .)
true if serializable types are allowed; otherwise, false.
Gets a value indicating whether a given should be serialized or not.
The member to check.
true if the given member should be serialized, otherwise, false.
An attribute that lets you help the DefaultSerializationBinder bind type names to types. This is useful if you're renaming a type,
that would result in data loss, and what to specify the new type name to avoid loss of data.
[assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName", typeof(Namespace.NewTypeName))]
//[assembly: OdinSerializer.BindTypeNameToType("Namespace.OldTypeName, OldFullAssemblyName", typeof(Namespace.NewTypeName))]
namespace Namespace
{
public class SomeComponent : SerializedMonoBehaviour
{
public IInterface test; // Contains an instance of OldTypeName;
}
public interface IInterface { }
public class NewTypeName : IInterface { }
//public class OldTypeName : IInterface { }
}
Initializes a new instance of the class.
Old old full type name. If it's moved to new a new assembly you must specify the old assembly name as well. See example code in the documentation.
The new type.
Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility.
Bind a type to a name.
The type to bind.
The debug context to log to.
The name that the type has been bound to.
The type argument is null.
Determines whether the specified type name is mapped.
Binds a name to type.
The name of the type to bind.
The debug context to log to.
The type that the name has been bound to, or null if the type could not be resolved.
The typeName argument is null.
The context of a given deserialization session. This class maintains all internal and external references during deserialization.
Initializes a new instance of the class.
Initializes a new instance of the class.
The streaming context to use.
Initializes a new instance of the class.
The formatter converter to use.
Initializes a new instance of the class.
The streaming context to use.
The formatter converter to use.
The formatterConverter parameter is null.
Gets or sets the context's type binder.
The context's serialization binder.
Gets or sets the string reference resolver.
The string reference resolver.
Gets or sets the Guid reference resolver.
The Guid reference resolver.
Gets or sets the index reference resolver.
The index reference resolver.
Gets the streaming context.
The streaming context.
Gets the formatter converter.
The formatter converter.
Gets or sets the serialization configuration.
The serialization configuration.
Registers an internal reference to a given id.
The id to register the reference with.
The reference to register.
Gets an internal reference from a given id, or null if the id has not been registered.
The id of the reference to get.
An internal reference from a given id, or null if the id has not been registered.
Gets an external object reference by index, or null if the index could not be resolved.
The index to resolve.
An external object reference by the given index, or null if the index could not be resolved.
Gets an external object reference by guid, or null if the guid could not be resolved.
The guid to resolve.
An external object reference by the given guid, or null if the guid could not be resolved.
Gets an external object reference by an id string, or null if the id string could not be resolved.
The id string to resolve.
An external object reference by an id string, or null if the id string could not be resolved.
Resets the deserialization context completely to baseline status, as if its constructor has just been called.
This allows complete reuse of a deserialization context, with all of its internal reference buffers.
An entry type which is part of a stream being read by a .
Could not parse entry.
Entry is a primitive value of type string or char.
Entry is a primitive value of type guid.
Entry is a primitive value of type sbyte, byte, short, ushort, int, uint, long or ulong.
Entry is a primitive value of type float, double or decimal.
Entry is a primitive boolean value.
Entry is a null value.
Entry marks the start of a node, IE, a complex type that contains values of its own.
Entry marks the end of a node, IE, a complex type that contains values of its own.
Entry contains an ID that is a reference to a node defined previously in the stream.
Entry contains the index of an external object in the DeserializationContext.
Entry contains the guid of an external object in the DeserializationContext.
Entry marks the start of an array.
Entry marks the end of an array.
Entry marks a primitive array.
Entry indicating that the reader has reached the end of the data stream.
Entry contains the string id of an external object in the DeserializationContext.
Causes Odin's inspector to completely ignore a given member, preventing it from even being included in an Odin PropertyTree,
and such will not cause any performance hits in the inspector.
Note that Odin can still serialize an excluded member - it is merely ignored in the inspector itself.
Provides an array of utility methods which are commonly used by serialization formatters.
Gets a map of all serializable members on the given type. This will also properly map names extracted from and to their corresponding members.
The type to get a map for.
The serialization policy to use. If null, is used.
A map of all serializable members on the given type.
Gets an array of all serializable members on the given type.
The type to get serializable members for.
The serialization policy to use. If null, is used.
An array of all serializable members on the given type.
Creates a fake Unity null value of a given type, for the given -derived owning type.
Unity uses these kinds of values to indicate missing object references.
Type of the null value.
Type of the owning value. This is the value which changes the which you get.
A fake Unity null value of a given type.
The nullType or owningType parameter is null.
The type given in the nullType parameter is not a Unity object.
or
The type given in the owningType parameter is not a Unity object.
Determines whether a given type is a primitive type to the serialization system.
The following criteria are checked: type.IsPrimitive or type.IsEnum, or type is a , or .
The type to check.
true if the given type is a primitive type; otherwise, false.
Determines whether a given type is a primitive array type. Namely, arrays with primitive array types as elements are primitive arrays.
The following types are primitive array types: , , , , , , , , , , , , and .
The type to check.
true if the given type is a primitive array type; otherwise, false.
Gets the type contained in the given . Currently only and is supported.
The to get the contained type of.
The type contained in the given .
Can't get the contained type of the given type.
Gets the value contained in a given . Currently only and is supported.
The to get the value of.
The instance to get the value from.
The value contained in the given .
Can't get the value of the given type.
Sets the value of a given MemberInfo. Currently only and is supported.
The to set the value of.
The object to set the value on.
The value to set.
Property has no setter
or
Can't set the value of the given type.
Gets an aliased version of a member, with the declaring type name included in the member name, so that there are no conflicts with private fields and properties with the same name in different classes in the same inheritance hierarchy.
Marked internal in Odin because this method MUST NOT BE CALLED FROM ODIN'S INSPECTOR CODE.
Odin has its own version of this, and there must be no conflict. These aliases must not be
mixed into Odin's own. Use InspectorPropertyInfoUtility.GetPrivateMemberAlias instead.
Resolves external guid references to reference objects during serialization and deserialization.
Gets or sets the next resolver in the chain.
The next resolver in the chain.
Tries to resolve a reference from a given Guid.
The Guid to resolve.
The resolved value.
true if the value was resolved; otherwise, false.
Determines whether this resolver can reference the specified value with a Guid.
The value to check.
The Guid which references the value.
true if the value can be referenced; otherwise, false.
Resolves external index references to reference objects during serialization and deserialization.
Tries to resolve the given reference index to a reference value.
The index to resolve.
The resolved value.
true if the index could be resolved to a value, otherwise false.
Determines whether the specified value can be referenced externally via this resolver.
The value to reference.
The index of the resolved value, if it can be referenced.
true if the reference can be resolved, otherwise false.
Resolves external strings references to reference objects during serialization and deserialization.
Gets or sets the next resolver in the chain.
The next resolver in the chain.
Tries to resolve a reference from a given Guid.
The to resolve.
The resolved value.
true if the value was resolved; otherwise, false.
Determines whether this resolver can reference the specified value with a string.
The value to check.
The string which references the value.
true if the value can be referenced; otherwise, false.
Specifies that a type is capable of serializing itself using an and an
.
The deserialized type instance will be created without a constructor call using the
method if it is a reference type, otherwise it will be created using default(type).
Use to specify that a class which implements this
interface should *always* format itself regardless of other formatters being specified.
Serializes the instance's data using the given writer.
Deserializes data into the instance using the given reader.
Defines which members to serialize and deserialize when there aren't any custom formatters for a type.
Usually, it governs the behaviour of the and classes.
Gets the identifier of the policy. This can be stored in the serialization metadata, so the policy used to serialize can be recovered upon deserialization without knowing the policy ahead of time. This ID should preferably be unique.
The identifier of the policy.
Gets a value indicating whether to allow non serializable types. (Types which are not decorated with .)
true if serializable types are allowed; otherwise, false.
Gets a value indicating whether a given should be serialized or not.
The member to check.
true if the given member should be serialized, otherwise, false.
Contains information about a node during deserialization and serialization.
An empty node.
The name of the node.
The id of the node, or -1 if the node has no id.
The type of the node, or null if the node has no type metadata.
Whether the node is an array or not.
Whether the node is an empty node.
Initializes a new instance of the struct.
The name of the node.
The id of the node.
The type of the node.
If set to true the node is an array node.
Implements the operator == between and .
The first .
The second .
true if the nodes were equal; otherwise, false.
Implements the operator != between and .
The first .
The second .
true if the nodes were not equal; otherwise, false.
Determines whether the specified , is equal to this instance.
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false.
Returns a hash code for this instance.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Indicates that an instance field or auto-property should be serialized by Odin.
An Odin-serialized prefab modification, containing all the information necessary to apply the modification.
The type of modification to be made.
The deep reflection path at which to make the modification.
A list of all deep reflection paths in the target object where the value referenced by this modification was also located.
The modified value to set.
The new list length to set.
The dictionary keys to add.
The dictionary keys to remove.
Applies the modification to the given Object.
Types of prefab modification that can be applied.
A value has been changed at a given path.
A list length has been changed at a given path.
A dictionary has been changed at a given path.
Indicates that an instance field or auto-property was previously serialized with a different name, so that values serialized with the old name will be properly deserialized into this member.
This does the same as Unity's FormerlySerializedAs attribute, except it can also be applied to properties.
The former name.
Initializes a new instance of the class.
The former name.
Corresponds to the .NET class, but works only with buffers and so never allocates garbage.
This class always writes and reads bytes in a little endian format, regardless of system architecture.
Converts a byte array into a hexadecimal string.
Converts a hexadecimal string into a byte array.
Reads two bytes from a buffer and converts them into a value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads two bytes from a buffer and converts them into a value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads four bytes from a buffer and converts them into an value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads four bytes from a buffer and converts them into an value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads eight bytes from a buffer and converts them into a value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads eight bytes from a buffer and converts them into an value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads four bytes from a buffer and converts them into an value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads eight bytes from a buffer and converts them into an value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads sixteen bytes from a buffer and converts them into a value.
The buffer to read from.
The index to start reading at.
The converted value.
Reads sixteen bytes from a buffer and converts them into a value.
The buffer to read from.
The index to start reading at.
The converted value.
Turns a value into two bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns an value into two bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns an value into four bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns an value into four bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns a value into eight bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns an value into eight bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns a value into four bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns a value into eight bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns a value into sixteen bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
Turns a value into sixteen bytes and writes those bytes to a given buffer.
The buffer to write to.
The index to start writing at.
The value to write.
An exception thrown when the serialization system has encountered an issue so severe that serialization is being aborted. If this exception is caught in the serialization system somewhere, it should be rethrown.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
The message.
The inner exception.
Defines the configuration during serialization and deserialization. This class is thread-safe.
Initializes a new instance of the class.
Setting this member to true indicates that in the case where, when expecting to deserialize an instance of a certain type,
but encountering an incompatible, uncastable type in the data being read, the serializer should attempt to deserialize an
instance of the expected type using the stored, possibly invalid data.
This is equivalent to applying the attribute, except global
instead of specific to a single type. Note that if this member is set to false, individual types may still be deserialized
with invalid data if they are decorated with the attribute.
Gets or sets the serialization policy. This value is never null; if set to null, it will default to .
The serialization policy.
Gets or sets the debug context. This value is never null; if set to null, a new default instance of will be created upon the next get.
The debug context.
Resets the configuration to a default configuration, as if the constructor had just been called.
Defines a context for debugging and logging during serialization and deserialization. This class is thread-safe.
The logger to use for logging messages.
The logging policy to use.
The error handling policy to use.
Log a warning. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown.
Log an error. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown.
Log an exception. Depending on the logging policy and error handling policy, this message may be suppressed or result in an exception being thrown.
The context of a given serialization session. This class maintains all internal and external references during serialization.
Initializes a new instance of the class.
Initializes a new instance of the class.
The streaming context to use.
Initializes a new instance of the class.
The formatter converter to use.
Initializes a new instance of the class.
The streaming context to use.
The formatter converter to use.
The formatterConverter parameter is null.
Gets or sets the context's type binder.
The context's serialization binder.
Gets the streaming context.
The streaming context.
Gets the formatter converter.
The formatter converter.
Gets or sets the index reference resolver.
The index reference resolver.
Gets or sets the string reference resolver.
The string reference resolver.
Gets or sets the Guid reference resolver.
The Guid reference resolver.
Gets or sets the serialization configuration.
The serialization configuration.
Tries to get the id of an internally referenced object.
The reference to get the id of.
The id that was found, or -1 if no id was found.
true if a reference was found, otherwise false.
Tries to register an internal reference. Returns true if the reference was registered, otherwise, false when the reference has already been registered.
The reference to register.
The id of the registered reference.
true if the reference was registered, otherwise, false when the reference has already been registered.
Tries to register an external index reference.
The object to reference.
The index of the referenced object.
true if the object could be referenced by index; otherwise, false.
Tries to register an external guid reference.
The object to reference.
The guid of the referenced object.
true if the object could be referenced by guid; otherwise, false.
Tries to register an external string reference.
The object to reference.
The id string of the referenced object.
true if the object could be referenced by string; otherwise, false.
Resets the context's internal reference map.
Resets the serialization context completely to baseline status, as if its constructor has just been called.
This allows complete reuse of a serialization context, with all of its internal reference buffers.
Contains a set of default implementations of the interface.
NOTE: Policies are not necessarily compatible with each other in intuitive ways.
Data serialized with the policy
will for example fail to deserialize auto-properties with ,
even if only strict data is needed.
It is best to ensure that you always use the same policy for serialization and deserialization.
This class and all of its policies are thread-safe.
Tries to get a serialization policy by its id, in case a serialization graph has the policy used for serialization stored by name.
All fields not marked with are serialized. If a field is marked with both and , then the field will be serialized.
Public fields, as well as fields or auto-properties marked with or and not marked with , are serialized.
There are two exceptions:
1) All fields in tuples, as well as in private nested types marked as compiler generated (e.g. lambda capture classes) are also serialized.
2) Virtual auto-properties are never serialized. Note that properties specified by an implemented interface are automatically marked virtual by the compiler.
Only fields and auto-properties marked with or and not marked with are serialized.
There are two exceptions:
1) All fields in private nested types marked as compiler generated (e.g. lambda capture classes) are also serialized.
2) Virtual auto-properties are never serialized. Note that properties specified by an implemented interface are automatically marked virtual by the compiler.
Provides an array of utility wrapper methods for easy serialization and deserialization of objects of any type.
Creates an for a given format.
The stream to write to.
The serialization context to use.
The format to write.
An for a given format.
Creates an for a given format.
The stream to read from.
The deserialization context to use.
The format to read.
An for a given format.
Serializes the given value using the given writer.
The value to serialize.
The writer to use.
Serializes the given value, using the given writer.
The value to serialize.
The writer to use.
A list of the Unity objects which were referenced during serialization.
Serializes the given value using the given writer.
The type of the value to serialize.
The value to serialize.
The writer to use.
Serializes the given value, using the given writer.
The type of the value to serialize.
The value to serialize.
The writer to use.
A list of the Unity objects which were referenced during serialization.
Serializes the given value to a given stream in the specified format.
The value to serialize.
The stream to serialize to.
The format to serialize in.
The context.
Serializes the given value to a given stream in the specified format.
The value to serialize.
The stream to serialize to.
The format to serialize in.
A list of the Unity objects which were referenced during serialization.
The context.
Serializes the given value to a given stream in the specified format.
The type of the value to serialize.
The value to serialize.
The stream to serialize to.
The format to serialize in.
The context.
Serializes the given value to a given stream in the specified format.
The type of the value to serialize.
The value to serialize.
The stream to serialize to.
The format to serialize in.
A list of the Unity objects which were referenced during serialization.
The context.
Serializes the given value using the specified format, and returns the result as a byte array.
The value to serialize.
The format to use.
The context.
A byte array containing the serialized value.
Serializes the given value using the specified format, and returns the result as a byte array.
The value to serialize.
The format to use.
A list of the Unity objects which were referenced during serialization.
A byte array containing the serialized value.
Serializes the given value using the specified format, and returns the result as a byte array.
The type of the value to serialize.
The value to serialize.
The format to use.
The context to use.
A byte array containing the serialized value.
Serializes the given value using the specified format and returns the result as a byte array.
The type of the value to serialize.
The value to serialize.
The format to use.
A list of the Unity objects which were referenced during serialization.
The context to use.
A byte array containing the serialized value.
Deserializes a value from the given reader. This might fail with primitive values, as they don't come with metadata.
The reader to use.
The deserialized value.
Deserializes a value from the given reader, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata.
The reader to use.
The list of Unity objects to use for external index reference resolution.
The deserialized value.
Deserializes a value from the given reader.
The type to deserialize.
The reader to use.
The deserialized value.
Deserializes a value of a given type from the given reader, using the given list of Unity objects for external index reference resolution.
The type to deserialize.
The reader to use.
The list of Unity objects to use for external index reference resolution.
The deserialized value.
Deserializes a value from the given stream in the given format. This might fail with primitive values, as they don't come with type metadata.
The reader to use.
The format to read.
The context.
The deserialized value.
Deserializes a value from the given stream in the given format, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata.
The stream to read from.
The format to read.
The list of Unity objects to use for external index reference resolution.
The context.
The deserialized value.
Deserializes a value of a given type from the given stream in the given format.
The type to deserialize.
The stream to read from.
The format to read.
The context.
The deserialized value.
Deserializes a value of a given type from the given stream in the given format, using the given list of Unity objects for external index reference resolution.
The type to deserialize.
The stream to read from.
The format to read.
The list of Unity objects to use for external index reference resolution.
The context.
The deserialized value.
Deserializes a value from the given byte array in the given format. This might fail with primitive values, as they don't come with type metadata.
The bytes to deserialize from.
The format to read.
The context.
The deserialized value.
Deserializes a value from the given byte array in the given format, using the given list of Unity objects for external index reference resolution. This might fail with primitive values, as they don't come with type metadata.
The bytes to deserialize from.
The format to read.
The list of Unity objects to use for external index reference resolution.
The deserialized value.
Deserializes a value of a given type from the given byte array in the given format.
The type to deserialize.
The bytes to deserialize from.
The format to read.
The context to use.
The deserialized value.
Deserializes a value of a given type from the given byte array in the given format, using the given list of Unity objects for external index reference resolution.
The type to deserialize.
The bytes to deserialize from.
The format to read.
The list of Unity objects to use for external index reference resolution.
The context to use.
The deserialized value.
Creates a deep copy of an object. Returns null if null. All Unity objects references will remain the same - they will not get copied.
Similarly, strings are not copied, nor are reflection types such as System.Type, or types derived from System.Reflection.MemberInfo,
System.Reflection.Assembly or System.Reflection.Module.
Binds types to strings during serialization, and strings to types during deserialization.
Provides a default, catch-all implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility.
Bind a type to a name.
The type to bind.
The debug context to log to.
The name that the type has been bound to.
Binds a name to a type.
The name of the type to bind.
The debug context to log to.
The type that the name has been bound to, or null if the type could not be resolved.
Determines whether the specified type name is mapped.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for all complex types; IE, types which are not primitives as determined by the method.
The type which the can serialize and deserialize.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for all enums.
The type of the enum to serialize and deserialize.
Reads an enum value of type .
The reader to use.
The value which has been read.
Writes an enum value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializes and deserializes a given type, and wraps serialization and deserialization with all the proper calls to free formatters from tedious boilerplate.
Whenever serializing or deserializing anything, it is *strongly recommended* to use to get a proper wrapping serializer for that type.
NOTE: This class should NOT be inherited from; it is hard-coded into the system.
To extend the serialization system, instead create custom formatters, which are used by the class.
Editor-only event that fires whenever a serializer serializes a type.
Fires the event.
Gets a for the given value. If the value is null, it will be treated as a value of type .
The value to get a for.
A for the given value.
Gets a for type T.
The type to get a for.
A for type T.
Gets a for the given type.
The type to get a for.
A for the given type.
The type argument is null.
Reads a value weakly, casting it into object. Use this method if you don't know what type you're going to be working with at compile time.
The reader to use.
The value which has been read.
Writes a weakly typed value. Use this method if you don't know what type you're going to be working with at compile time.
The value to write.
The writer to use.
Writes a weakly typed value with a given name. Use this method if you don't know what type you're going to be working with at compile time.
The name of the value to write.
The value to write.
The writer to use.
Serializes and deserializes the type , and wraps serialization and deserialization with all the proper calls to free formatters from tedious boilerplate.
Whenever serializing or deserializing anything, it is *strongly recommended* to use to get a proper wrapping serializer for that type.
NOTE: This class should NOT be inherited from; it is hard-coded into the system.
To extend the serialization system, instead create custom formatters, which are used by the class.
The type which the can serialize and deserialize.
Reads a value of type weakly, casting it into object. Use this method if you don't know what type you're going to be working with at compile time.
The reader to use.
The value which has been read.
Writes a weakly typed value of type with a given name. Use this method if you don't know what type you're going to be working with at compile time.
The name of the value to write.
The value to write.
The writer to use.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The value to write.
The writer to use.
Writes a value of type with a given name.
The name of the value to write.
The value to write.
The writer to use.
Fires the event with the T generic argument of the serializer.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Serializer for the type.
Reads a value of type .
The reader to use.
The value which has been read.
Writes a value of type .
The name of the value to write.
The value to write.
The writer to use.
Scans the project's build scenes and resources, plus their dependencies, for serialized types to support. Progress bars are shown during the scan.
The serialized types to support.
Whether to scan the project's build scenes.
Whether to scan all the project's asset bundles.
Whether to scan the project's preloaded assets.
Whether to scan the project's resources.
An optional list of the resource paths to scan. Only has an effect if the scanResources argument is true. All the resources will be scanned if null.
true if the scan succeeded, false if the scan failed or was cancelled
Generates an AOT DLL, using the given parameters.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Provides utility methods for handling dictionary keys in the prefab modification system.
A smart comparer for dictionary keys, that uses the most appropriate available comparison method for the given key types.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Gets the provider identifier.
Gets the path string from key.
The key.
Gets the key from path string.
The path string.
Compares the specified x.
The x.
The y.
Not yet documented.
Gets the path string from key.
The key.
Gets the key from path string.
The path string.
Compares the specified x.
The x.
The y.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Dictionary key path provider for
Custom formatter for the type.
Returns null.
A null value.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
This serializes nothing and always deserializes null,
and only exists to ensure that no coroutine instances
are ever created by the serialization system, since they
will in almost all cases be invalid instances.
Invalid coroutine instances crash Unity instantly when
they are garbage collected.
Gets the type that the formatter can serialize.
The type that the formatter can serialize.
Returns null.
Returns null.
Does nothing.
Does nothing.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom generic formatter for the , , and types.
The type of UnityEvent that this formatter can serialize and deserialize.
Get an uninitialized object of type .
An uninitialized object of type .
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Custom formatter for the type.
Reads into the specified value using the specified reader.
The value to read into.
The reader to use.
Writes from the specified value using the specified writer.
The value to write from.
The writer to use.
Indicates that an Odin-serialized Unity object controls its own serialization format. Every time it is serialized, it will be asked which format to use.
Gets the format to use for serialization.
Indicates that an Odin-serialized Unity object provides its own serialization policy rather than using the default policy.
Note that THE VALUES RETURNED BY THIS INTERFACE WILL OVERRIDE THE PARAMETERS PASSED TO and .
Indicates that an Odin-serialized Unity object supports prefab serialization.
Gets or sets the serialization data of the object.
Unity serialized data struct that contains all data needed by Odin serialization.
The name of the field.
The name of the field.
The name of the field.
The data format used by the serializer. This field will be automatically set to the format specified in the global serialization config
when the Unity object gets serialized, unless the Unity object implements the interface.
The serialized data when serializing with the Binray format.
All serialized Unity references.
Whether the object contains any serialized data.
Gets a value indicating whether the struct contains any data.
If this is false, then it could mean that Unity has not yet deserialized the struct.
The serialized data when serializing with the JSON format.
The reference to the prefab this is only populated in prefab scene instances.
All serialized Unity references.
All Odin serialized prefab modifications.
The serialized data when serializing with the Nodes format.
Resets all data.
Resolves external index references to Unity objects.
Initializes a new instance of the class.
Initializes a new instance of the class with a list of Unity objects.
The referenced Unity objects.
Gets the currently referenced Unity objects.
A list of the currently referenced Unity objects.
Sets the referenced Unity objects of the resolver to a given list, or a new list if the value is null.
The referenced Unity objects to set, or null if a new list is required.
Determines whether the specified value can be referenced externally via this resolver.
The value to reference.
The index of the resolved value, if it can be referenced.
true if the reference can be resolved, otherwise false.
Tries to resolve the given reference index to a reference value.
The index to resolve.
The resolved value.
true if the index could be resolved to a value, otherwise false.
Resets this instance.
Utility class which initializes the Sirenix serialization system to be compatible with Unity.
Initializes the Sirenix serialization system to be compatible with Unity.
Provides an array of utility wrapper methods for easy serialization and deserialization of Unity objects of any type.
Note that, during serialization, it is always assumed that we are running on Unity's main thread. Deserialization can
happen on any thread, and all API's interacting with deserialization are thread-safe.
Note that setting the IndexReferenceResolver on contexts passed into methods on this class will have no effect, as it will always
be set to a UnityReferenceResolver.
From the new scriptable build pipeline package
Note: it is assumed that code calling this is holding the DeserializePrefabCaches_LOCK lock, and will continue to hold it while the returned hashset is being modified
Whether to always force editor mode serialization. This member only exists in the editor.
Not yet documented.
Checks whether Odin will serialize a given member.
The member to check.
Whether to allow serialization of members that will also be serialized by Unity.
The policy that Odin should be using for serialization of the given member. If this parameter is null, it defaults to .
True if Odin will serialize the member, otherwise false.
Guesses whether or not Unity will serialize a given member. This is not completely accurate.
The member to check.
True if it is guessed that Unity will serialize the member, otherwise false.
The parameter is null.
Guesses whether or not Unity will serialize a given type. This is not completely accurate.
The type to check.
True if it is guessed that Unity will serialize the type, otherwise false.
The parameter is null.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Creates an object with default values initialized in the style of Unity; strings will be "", classes will be instantiated recursively with default values, and so on.
In 2020.1, Unity changed EditorApplication.delayCall from a field to an event, meaning
we now have to use reflection to access it consistently across all versions of Unity.
FieldInfo method extensions.
Determines whether the specified field is an alias.
The field to check.
true if the specified field is an alias; otherwise, false.
Returns the original, backing field of an alias field if the field is an alias.
The field to check.
/// if set to true an exception will be thrown if the field is not aliased.
The field was not aliased; this only occurs if throwOnNotAliased is true.
Garbage free enumerator methods.
Garbage free enumerator for lists.
Garbage free enumerator for dictionaries.
Garbage free enumator for dictionary values.
Garbage free enumerator for hashsets.
List iterator.
Creates a list iterator.
Gets the enumerator.
Gets the current value.
Moves to the next value.
Disposes the iterator.
Hashset iterator.
Creates a hashset iterator.
Gets the enumerator.
Gets the current value.
Moves to the next value.
Disposes the iterator.
Dictionary iterator.
Creates a dictionary iterator.
Gets the enumerator.
Gets the current value.
Moves to the next value.
Disposes the iterator.
Dictionary value iterator.
Creates a dictionary value iterator.
Gets the enumerator.
Gets the current value.
Moves to the next value.
Disposes the iterator.
Various LinQ extensions.
Perform an action on each item.
The source.
The action to perform.
Perform an action on each item.
The source.
The action to perform.
Add a collection to the end of another collection.
The collection.
The collection to append.
MemberInfo method extensions.
Returns true if the attribute whose type is specified by the generic argument is defined on this member
Returns true if the attribute whose type is specified by the generic argument is defined on this member
Returns the first found custom attribute of type T on this member
Returns null if none was found
Returns the first found non-inherited custom attribute of type T on this member
Returns null if none was found
Gets all attributes of the specified generic type.
The member.
Gets all attributes of the specified generic type.
The member.
If true, specifies to also search the ancestors of element for custom attributes.
Gets all attribute instances defined on a MemeberInfo.
The member.
Gets all attribute instances on a MemberInfo.
The member.
If true, specifies to also search the ancestors of element for custom attributes.
If this member is a method, returns the full method name (name + params) otherwise the member name paskal splitted
Determines whether a FieldInfo, PropertyInfo or MethodInfo is static.
The member.
true if the specified member is static; otherwise, false.
Determines whether the specified member is an alias.
The member to check.
true if the specified member is an alias; otherwise, false.
Returns the original, backing member of an alias member if the member is an alias.
The member to check.
/// if set to true an exception will be thrown if the member is not aliased.
The member was not aliased; this only occurs if throwOnNotAliased is true.
Various extensions for MethodInfo.
Returns the specified method's full name "methodName(argType1 arg1, argType2 arg2, etc)"
Uses the specified gauntlet to replaces type names, ex: "int" instead of "Int32"
Returns a string representing the passed method parameters names. Ex "int num, float damage, Transform target"
Returns the specified method's full name.
Tests if a method is an extension method.
Determines whether the specified method is an alias.
The method to check.
true if the specified method is an alias; otherwise, false.
Returns the original, backing method of an alias method if the method is an alias.
The method to check.
/// if set to true an exception will be thrown if the method is not aliased.
The method was not aliased; this only occurs if throwOnNotAliased is true.
Determines the type of operator.
The == operator.
The != operator.
The + operator.
The - operator.
The * operator.
The / operator.
The < operator.
The > operator.
The <= operator.
The >= operator.
The % operator.
The >> operator.
The << operator.
The & operator.
The | operator.
The ^ operator.
The ~ operator.
The && operator.
The || operator.
The ! operator.
DirectoryInfo method extensions.
Determines whether the directory has a given directory in its hierarchy of children.
The parent directory.
The sub directory.
PropertyInfo method extensions.
Determines whether a property is an auto property with a usable getter and setter.
Determines whether the specified property is an alias.
The property to check.
true if the specified property is an alias; otherwise, false.
Returns the original, backing property of an alias property if the property is an alias.
The property to check.
/// if set to true an exception will be thrown if the property is not aliased.
The property was not aliased; this only occurs if throwOnNotAliased is true.
String method extensions.
Eg MY_INT_VALUE => MyIntValue
Returns true if this string is null, empty, or contains only whitespace.
The string to check.
true if this string is null, empty, or contains only whitespace; otherwise, false.
Type method extensions.
Type name alias lookup.
TypeNameAlternatives["Single"] will give you "float", "UInt16" will give you "ushort", "Boolean[]" will give you "bool[]" etc..
Checks whether a given string is a valid CSharp identifier name. This also checks full type names including namespaces.
The identifier to check.
Determines whether a type can be casted to another type.
From.
To.
if set to true an implicit or explicit operator must be defined on the given type.
If a type can be casted to another type, this provides a function to manually convert the type.
From.
To.
if set to true an implicit or explicit operator must be defined on the given type.
If a type can be casted to another type, this provides a function to manually convert the type.
if set to true an implicit or explicit operator must be defined on the given type.
If a type can be casted to another type, this provides the method info of the method in charge of converting the type.
From.
To.
if set to true an implicit or explicit operator must be defined on the given type.
Gets an equality comparer delegate used to compare the equality of values of a given type. In order, this will be:
1. The == operator, if one is defined on the type.
2. A delegate that uses , if the type implements that interface.
3. .NET's own
Note that in the special case of the type , a special equality comparer is returned that only checks whether all the Quaternion components are equal.
This is because, by default, Quaternion's equality operator is broken when operating on invalid quaternions; "default(Quaternion) == default(Quaternion)" evaluates to false, and this causes a multitude of problems.
Special delegates are also returned for float and double, that consider float.NaN to be equal to float.NaN, and double.NaN to be equal to double.NaN.
Gets the first attribute of type T. Returns null in the no attribute of type T was found.
The type.
If true, specifies to also search the ancestors of element for custom attributes.
Determines whether a type implements or inherits from another type.
The type.
To.
Determines whether a type implements an open generic interface or class such as IList<> or List<>.
Type of the candidate.
Type of the open generic type.
Determines whether a type implements an open generic interface such as IList<>.
Type of the candidate.
Type of the open generic interface.
Type " + openGenericInterfaceType.Name + " is not a generic type definition and an interface.
Determines whether a type implements an open generic class such as List<>.
Type of the candidate.
Type of the open generic interface.
Gets the generic arguments of an inherited open generic class or interface.
Type of the candidate.
The open generic type to get the arguments of.
Gets the generic arguments of an inherited open generic class.
Type of the candidate.
Type of the open generic class.
Gets the generic arguments of an inherited open generic interface.
Type of the candidate.
Type of the open generic interface.
Gets the MethodInfo of a specific operator kind, with the given left and right operands. This overload is *far* faster than any of the other GetOperatorMethod implementations, and should be used whenever possible.
Gets the MethodInfo of a specific operator type.
Gets the MethodInfo of a specific operator type.
Gets all members from a given type, including members from all base types if the flag isn't set.
Gets all members from a given type, including members from all base types.
Gets all members of a specific type from a type, including members from all base types, if the flag isn't set.
Gets the generic type definition of an open generic base type.
Gets the generic type definition of an open generic base type.
Returns a lazy enumerable of all the base types of this type including interfaces and classes
Returns a lazy enumerable of all the base classes of this type
Used to filter out unwanted type names. Ex "int" instead of "Int32"
Returns a nicely formatted name of a type.
Returns a nicely formatted full name of a type.
Gets the name of the compilable nice.
The type.
Gets the full name of the compilable nice.
The type.
Returns the first found custom attribute of type T on this type
Returns null if none was found
Returns the first found non-inherited custom attribute of type T on this type
Returns null if none was found
Gets all attributes of type T.
The type.
Gets all attributes of type T.
The type
If true, specifies to also search the ancestors of element for custom attributes.
Returns true if the attribute whose type is specified by the generic argument is defined on this type
Returns true if the attribute whose type is specified by the generic argument is defined on this type
Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>.
Determines whether a type inherits or implements another type. Also include support for open generic base types such as List<>.
Gets the number of base types between given type and baseType.
Determines whether a method has the specified parameter types.
FieldInfo will return the fieldType, propertyInfo the PropertyType, MethodInfo the return type and EventInfo will return the EventHandlerType.
The MemberInfo.
Gets the value contained in a given . Currently only and is supported.
The to get the value of.
The instance to get the value from.
The value contained in the given .
Can't get the value of the given type.
Sets the value of a given MemberInfo. Currently only and is supported.
The to set the value of.
The object to set the value on.
The value to set.
Property has no setter
or
Can't set the value of the given type.
Tries to infer a set of valid generic parameters for a generic type definition, given a subset of known parameters.
The generic type definition to attempt to infer parameters for.
The inferred parameters, if inferral was successful.
The known parameters to infer from.
True if the parameters could be inferred, otherwise, false.
genericTypeDefinition is null
or
knownParameters is null
The genericTypeDefinition parameter must be a generic type definition.
Checks whether an array of types satisfy the constraints of a given generic type definition.
If this method returns true, the given parameters can be safely used with with the given generic type definition.
The generic type definition to check.
The parameters to check validity for.
genericType is null
or
types is null
The genericType parameter must be a generic type definition.
Checks whether an array of types satisfy the constraints of a given generic method definition.
If this method returns true, the given parameters can be safely used with with the given generic method definition.
The generic method definition to check.
The parameters to check validity for.
genericType is null
or
types is null
The genericMethod parameter must be a generic method definition.
Before calling this method we must ALWAYS hold a lock on the GenericConstraintsSatisfaction_LOCK object, as that is an implicit assumption it works with.
Not yet documented.
Formats a string with the specified generic parameter constraints on any given type. Example output: where T : class
Determines whether a generic type contains the specified generic argument constraints.
The type.
The generic argument types.
Determines whether a type is a fully constructed generic type.
Determines whether a type is nullable by ensuring the type is neither a PrimitiveType, ValueType or an Enum.
Gets the enum bitmask in a ulong.
enumType
Extends various Unity classes.
Determines whether a Unity object is null or "fake null",
without ever calling Unity's own equality operators.
This method is useful for checking if a Unity object is
null, destroyed or missing at times when it is not allowed
to call Unity's own equality operators, for example when
not running on the main thread.
The Unity object to check.
True if the object is null, missing or destroyed; otherwise false.
Defines how an assembly's import settings should be configured.
Include the assembly in the build, but not in the editor.
Include the assembly in the editor, but not in the build.
Include the assembly in both the build and in the editor.
Exclude the assembly from both the build and from the editor.
Utility for correctly setting import on OdinSerializer assemblies based on platform and scripting backend.
All valid Unity BuildTarget platforms.
All valid Unity BuildTarget platforms that support Just In Time compilation.
All scripting backends that support JIT.
All API compatibility levels that support JIT.
Set the import settings on the assembly.
The path to the assembly to configure import settings from.
The import settings to configure for the assembly at the path.
Set the import settings on the assembly.
The path to the assembly to configure import settings from.
Indicates if the assembly should be included in the build.
Indicates if the assembly should be included in the Unity editor.
Gets the current scripting backend for the build from the Unity editor. This method is Unity version independent.
Gets the current API compatibility level from the Unity Editor. This method is Unity version independent.
Gets a value that indicates if the specified platform supports JIT.
The platform to test.
true if the platform supports JIT; otherwise false.
Gets a value that indicates if the specified scripting backend supports JIT.
The backend to test.
true if the backend supports JIT; otherwise false.
Gets a value that indicates if the specified api level supports JIT.
The api level to test.
true if the api level supports JIT; otherwise false.
Gets a value that indicates if the specified build settings supports JIT.
The platform build setting.
The scripting backend build settting.
The api level build setting.
true if the build settings supports JIT; otherwise false.
Provides an easy way of claiming and freeing cached values of any non-abstract reference type with a public parameterless constructor.
Cached types which implement the interface will receive notifications when they are claimed and freed.
Only one thread should be holding a given cache instance at a time if is implemented, since the invocation of
is not thread safe, IE, weird stuff might happen if multiple different threads are trying to free
the same cache instance at the same time. This will practically never happen unless you're doing really strange stuff, but the case is documented here.
The type which is cached.
Gets or sets the maximum size of the cache. This value can never go beneath 1.
The maximum size of the cache.
The cached value.
Gets a value indicating whether this cached value is free.
true if this cached value is free; otherwise, false.
Claims a cached value of type .
A cached value of type .
Releases a cached value.
The cached value to release.
The cached value to release is null.
Performs an implicit conversion from to .
The cache to convert.
The result of the conversion.
Releases this cached value.
Releases this cached value.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Provides utilities for using the namespace.
This class is due for refactoring. Use at your own peril.
Gets a value indicating whether emitting is supported on the current platform.
true if the current platform can emit; otherwise, false.
Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The type of the field to get a value from.
The instance describing the field to create a getter for.
A delegate which gets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The instance describing the field to create a getter for.
A delegate which gets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
The type of the field to set a value to.
The instance describing the field to create a setter for.
A delegate which sets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
The instance describing the field to create a setter for.
A delegate which sets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The type of the instance to get a value from.
The type of the field to get a value from.
The instance describing the field to create a getter for.
A delegate which gets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which gets the value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The type of the field to get a value from.
The of the instance to get a value from.
The instance describing the field to create a getter for.
A delegate which gets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The of the instance to get a value from.
The instance describing the field to create a getter for.
A delegate which gets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
The type of the instance to set a value on.
The type of the field to set a value to.
The instance describing the field to create a setter for.
A delegate which sets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which sets the value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
The type of the field to set a value to.
Type of the instance.
The instance describing the field to create a setter for.
A delegate which sets the value of the given field.
The fieldInfo parameter is null.
Field cannot be static.
Creates a delegate which sets the weakly typed value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Type of the instance.
The instance describing the field to create a setter for.
A delegate which sets the value of the given field.
The fieldInfo parameter is null.
Field cannot be static.
Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The of the instance to get a value from.
The instance describing the field to create a getter for.
A delegate which gets the value of the given field.
The fieldInfo parameter is null.
Creates a delegate which sets the weakly typed value of a property on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Type of the instance.
The instance describing the property to create a setter for.
A delegate which sets the value of the given field.
The fieldInfo parameter is null.
Property cannot be static.
Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
The type of the property to set a value to.
The instance describing the property to create a setter for.
A delegate which sets the value of the given property.
The propertyInfo parameter is null.
Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The type of the property to get a value from.
The instance describing the property to create a getter for.
A delegate which gets the value of the given property.
The propertyInfo parameter is null.
Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
The type of the instance to set a value on.
The type of the property to set a value to.
The instance describing the property to create a setter for.
A delegate which sets the value of the given property.
The propertyInfo parameter is null.
Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
The type of the instance to get a value from.
The type of the property to get a value from.
The instance describing the property to create a getter for.
A delegate which gets the value of the given property.
The propertyInfo parameter is null.
Creates a fast delegate method which calls a given parameterless instance method and returns the result.
The type of the class which the method is on.
The type which is returned by the given method info.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Creates a fast delegate method which calls a given parameterless static method.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Creates a fast delegate method which calls a given parameterless weakly typed instance method.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Not yet documented.
Creates a fast delegate method which calls a given weakly typed instance method with one argument and returns a value.
The type of the result.
The type of the first argument.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
methodInfo
Given method ' + methodInfo.Name + ' is static when it has to be an instance method.
or
Given method ' + methodInfo.Name + ' must return type + typeof(TResult) + .
or
Given method ' + methodInfo.Name + ' must have exactly one parameter.
or
The first parameter of the method ' + methodInfo.Name + ' must be of type + typeof(TArg1) + .
Not yet documented.
Not yet documented.
Creates a fast delegate method which calls a given parameterless instance method on a reference type.
The type of the class which the method is on.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Creates a fast delegate method which calls a given instance method with a given argument on a reference type.
The type of the class which the method is on.
The type of the argument with which to call the method.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Creates a fast delegate method which calls a given parameterless instance method.
The type of the class which the method is on.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Creates a fast delegate method which calls a given instance method with a given argument on a struct type.
The type of the class which the method is on.
The type of the argument with which to call the method.
The method info instance which is used.
A delegate which calls the method and returns the result, except it's hundreds of times faster than MethodInfo.Invoke.
Compares types by reference before comparing them using the default type equality operator.
This can constitute a *significant* speedup when used as the comparer for dictionaries.
This class encapsulates common combinations.
Search criteria encompassing all public and non-public members, including base members.
Note that you also need to specify either the Instance or Static flag.
Search criteria encompassing all public instance members, including base members.
Search criteria encompassing all non-public instance members, including base members.
Search criteria encompassing all public and non-public instance members, including base members.
Search criteria encompassing all public static members, including base members.
Search criteria encompassing all non-public static members, including base members.
Search criteria encompassing all public and non-public static members, including base members.
Search criteria encompassing all public instance members, excluding base members.
Search criteria encompassing all non-public instance members, excluding base members.
Search criteria encompassing all public and non-public instance members, excluding base members.
Search criteria encompassing all public static members, excluding base members.
Search criteria encompassing all non-public static members, excluding base members.
Search criteria encompassing all public and non-public static members, excluding base members.
Search criteria encompassing all members, including base and static members.
Search criteria encompassing all members (public and non-public, instance and static), including base members.
Provides notification callbacks for values that are cached using the class.
Called when the cached value is freed.
Called when the cached value is claimed.
Interface for immutable list.
Interface for generic immutable list.
Index accessor.
Immutable list wraps another list, and allows for reading the inner list, without the ability to change it.
Creates an immutable list around another list.
Number of items in the list.
Immutable list cannot be changed directly, so it's size is always fixed.
Immutable list are always readonly.
Returns true if the inner list is synchronized.
Gets the sync root object.
Index accessor.
Index.
Returns true if the item is contained in the list.
The item's value.
Copy the list to an array,
Target array.
Index.
Copy the list to an array,
Target array.
Index.
Gets an enumerator.
Get the index of a value.
The item's value.
Immutable list cannot be edited.
Index.
Immutable list cannot be edited.
Index.
Item.
Immutable list cannot be edited.
Item.
Immutable list cannot be edited.
Immutable list cannot be edited.
Item.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Not yet documented.
Immutable list wraps another list, and allows for reading the inner list, without the ability to change it.
Creates an immutable list around another list.
Number of items in the list.
Immutable list are always readonly.
Index accessor.
Index.
Returns true if the item is contained in the list.
Copies the list to an array.
Gets an enumerator.
Gets the index of an item.
Provides a methods of representing imaginary fields which are unique to serialization.
We aggregate the FieldInfo associated with this member and return a mangled form of the name.
The default fake name separator string.
Initializes a new instance of the class.
The field to alias.
The name prefix to use.
Initializes a new instance of the class.
The field to alias.
The name prefix to use.
The separator string to use.
Gets the aliased field.
The aliased field.
Gets the module in which the type that declares the member represented by the current is defined.
Gets a value that identifies a metadata element.
Gets the name of the current member.
Gets the class that declares this member.
Gets the class object that was used to obtain this instance of MemberInfo.
Gets the type of the field.
The type of the field.
Gets a RuntimeFieldHandle, which is a handle to the internal metadata representation of a field.
Gets the attributes.
The attributes.
When overridden in a derived class, returns an array of all custom attributes applied to this member.
True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined.
When overridden in a derived class, returns an array of custom attributes applied to this member and identified by .
The type of attribute to search for. Only attributes that are assignable to this type are returned.
True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied.
When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member.
The type of custom attribute to search for. The search includes derived types.
True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
True if one or more instances of or any of its derived types is applied to this member; otherwise, false.
Gets the value of the field.
The object instance to get the value from.
The value of the field.
When overridden in a derived class, sets the value of the field supported by the given object.
The object whose field value will be set.
The value to assign to the field.
A field of Binder that specifies the type of binding that is desired (for example, Binder.CreateInstance or Binder.ExactBinding).
A set of properties that enables the binding, coercion of argument types, and invocation of members through reflection. If is null, then Binder.DefaultBinding is used.
The software preferences of a particular culture.
Provides a methods of representing aliased methods.
In this case, what we're representing is a method on a parent class with the same name.
We aggregate the MethodInfo associated with this member and return a mangled form of the name.
The name that we return is "parentname+methodName".
The default fake name separator string.
Initializes a new instance of the class.
The method to alias.
The name prefix to use.
Initializes a new instance of the class.
The method to alias.
The name prefix to use.
The separator string to use.
Gets the aliased method.
The aliased method.
Gets the custom attributes for the return type.
Gets a handle to the internal metadata representation of a method.
Gets the attributes associated with this method.
Gets the class that declares this member.
Gets the name of the current member.
Gets the class object that was used to obtain this instance of MemberInfo.
When overridden in a derived class, returns the MethodInfo object for the method on the direct or indirect base class in which the method represented by this instance was first declared.
A MethodInfo object for the first implementation of this method.
When overridden in a derived class, returns an array of all custom attributes applied to this member.
true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined.
When overridden in a derived class, returns an array of custom attributes applied to this member and identified by .
The type of attribute to search for. Only attributes that are assignable to this type are returned.
true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied.
When overridden in a derived class, returns the flags.
The MethodImplAttributes flags.
When overridden in a derived class, gets the parameters of the specified method or constructor.
An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance.
When overridden in a derived class, invokes the reflected method or constructor with the given parameters.
The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor.
A bitmask that is a combination of 0 or more bit flags from . If is null, this parameter is assigned the value ; thus, whatever you pass in is ignored.
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If is null, the default binder is used.
An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.
An instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.)
An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.CautionElements of the array that represent parameters declared with the ref or out keyword may also be modified.
When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member.
The type of custom attribute to search for. The search includes derived types.
true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
true if one or more instances of or any of its derived types is applied to this member; otherwise, false.
Provides a methods of representing imaginary properties which are unique to serialization.
We aggregate the PropertyInfo associated with this member and return a mangled form of the name.
The default fake name separator string.
Initializes a new instance of the class.
The property to alias.
The name prefix to use.
Initializes a new instance of the class.
The property to alias.
The name prefix to use.
The separator string to use.
The backing PropertyInfo that is being aliased.
Gets the module in which the type that declares the member represented by the current is defined.
Gets a value that identifies a metadata element.
Gets the name of the current member.
Gets the class that declares this member.
Gets the class object that was used to obtain this instance of MemberInfo.
Gets the type of the property.
The type of the property.
Gets the attributes.
The attributes.
Gets a value indicating whether this instance can read.
true if this instance can read; otherwise, false.
Gets a value indicating whether this instance can write.
true if this instance can write; otherwise, false.
When overridden in a derived class, returns an array of all custom attributes applied to this member.
True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined.
When overridden in a derived class, returns an array of custom attributes applied to this member and identified by .
The type of attribute to search for. Only attributes that are assignable to this type are returned.
True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to have been applied.
When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member.
The type of custom attribute to search for. The search includes derived types.
True to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.
True if one or more instances of or any of its derived types is applied to this member; otherwise, false.
Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance.
Indicates whether non-public methods should be returned in the MethodInfo array. true if non-public methods are to be included; otherwise, false.
An array of objects whose elements reflect the get, set, and other accessors of the property reflected by the current instance. If is true, this array contains public and non-public get, set, and other accessors. If is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements.
When overridden in a derived class, returns the public or non-public get accessor for this property.
Indicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false.
A MethodInfo object representing the get accessor for this property, if is true. Returns null if is false and the get accessor is non-public, or if is true but no get accessors exist.
Gets the index parameters of the property.
The index parameters of the property.
When overridden in a derived class, returns the set accessor for this property.
Indicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false.
Value Condition A object representing the Set method for this property. The set accessor is public.-or- is true and the set accessor is non-public. null is true, but the property is read-only.-or- is false and the set accessor is non-public.-or- There is no set accessor.
Gets the value of the property on the given instance.
The object to invoke the getter on.
The to invoke with.
The binder to use.
The indices to use.
The culture to use.
The value of the property on the given instance.
Sets the value of the property on the given instance.
The object to set the value on.
The value to set.
The to invoke with.
The binder to use.
The indices to use.
The culture to use.
Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references.
A default, cached instance of this generic variant of the reference equality comparer.
Returns true if the object references are equal.
Returns the result of the object's own GetHashCode method.
Utility class indicating current Unity version.
Tests current Unity version is equal or greater.
Minimum major version.
Minimum minor version.
true if the current Unity version is greater. Otherwise false.
The current Unity version major.
The current Unity version minor.
Contains utilities for performing common unsafe operations.
Blindly creates an array of structs from an array of bytes via direct memory copy/blit.
Blindly creates an array of structs from an array of bytes via direct memory copy/blit.
Blindly copies an array of structs into an array of bytes via direct memory copy/blit.
Blindly copies an array of structs into an array of bytes via direct memory copy/blit.
Creates a new string from the contents of a given byte buffer.
Writes the contents of a string into a given byte buffer.
Blindly mem-copies a given number of bytes from the memory location of one object to another. WARNING: This method is ridiculously dangerous. Only use if you know what you're doing.
A Unity Behaviour which is serialized by the Sirenix serialization system.
Invoked after deserialization has taken place.
Invoked before serialization has taken place.
A Unity Component which is serialized by the Sirenix serialization system.
Invoked after deserialization has taken place.
Invoked before serialization has taken place.
A Unity MonoBehaviour which is serialized by the Sirenix serialization system.
Invoked after deserialization has taken place.
Invoked before serialization has taken place.
A Unity ScriptableObject which is serialized by the Sirenix serialization system.
Invoked after deserialization has taken place.
Invoked before serialization has taken place.
A Unity StateMachineBehaviour which is serialized by the Sirenix serialization system.
Invoked after deserialization has taken place.
Invoked before serialization has taken place.
A Unity ScriptableObject which is serialized by the Sirenix serialization system.
Invoked after deserialization has taken place.
Invoked before serialization has taken place.