private void onBillboardAppear(string json) { string scope; UpsightContentAttributes contentAttributes = UpsightContentAttributes.FromJson(json, out scope); if (UpsightManager.onBillboardAppearEvent == null) { return; } UpsightManager.onBillboardAppearEvent(scope, contentAttributes); }
public static UpsightContentAttributes FromJson(string json, out string scope) { scope = (string)null; UpsightContentAttributes contentAttributes = new UpsightContentAttributes(); Dictionary <string, object> jsonObject = Json.ToJsonObject(json); if (jsonObject != null) { if (jsonObject.ContainsKey(nameof(scope))) { scope = jsonObject[nameof(scope)].ToString(); } if (jsonObject.ContainsKey("type")) { contentAttributes.ContentType = (UpsightContentAttributes.Type)jsonObject.GetPrimitive <int>("type"); } if (jsonObject.ContainsKey("properties")) { contentAttributes.ContentProperties = Json.Serialize(jsonObject["properties"]); } } return(contentAttributes); }
private void onBillboardAppearEvent(string scope, UpsightContentAttributes content) { Debug.Log((object)("onBillboardAppearEvent: scope=" + scope + ", content=" + (object)content)); }
private void onBillboardAppearEvent(string scope, UpsightContentAttributes content) { }