public void Add(string name, object value) { if (value is string || value is bool || value is int || value is long || value is short || value is float || value is double) { _table[name] = new OnlineMapsJSONValue(value); } else if (value is UnityEngine.Object) { _table[name] = new OnlineMapsJSONValue((value as UnityEngine.Object).GetInstanceID()); } else { _table[name] = OnlineMapsJSON.Serialize(value); } }
public void Add(string name, object value, OnlineMapsJSONValue.ValueType valueType) { _table[name] = new OnlineMapsJSONValue(value, valueType); }