Пример #1
0
        /// <summary>
        /// Serializes the object to JSON.
        /// </summary>
        /// <param name="writer">The <see cref="T: Newtonsoft.Json.JsonWriter" /> to write to.</param>
        /// <param name="obj">The object to serialize to JSON.</param>
        internal static void Serialize(JsonWriter writer, NodeLoadInfo obj)
        {
            // Required properties are always serialized, optional properties are serialized when not null.
            writer.WriteStartObject();
            if (obj.NodeName != null)
            {
                writer.WriteProperty(obj.NodeName, "NodeName", NodeNameConverter.Serialize);
            }

            if (obj.NodeLoadMetricInformation != null)
            {
                writer.WriteEnumerableProperty(obj.NodeLoadMetricInformation, "NodeLoadMetricInformation", NodeLoadMetricInformationConverter.Serialize);
            }

            writer.WriteEndObject();
        }
Пример #2
0
 public GameObjectInfo(NodeLoadInfo _info, GameObject _go)
 {
     nodeInfo = _info;
     go       = _go;
 }