Exemple #1
0
    private void onBillboardAppear(string json)
    {
        string scope;
        UpsightContentAttributes contentAttributes = UpsightContentAttributes.FromJson(json, out scope);

        if (UpsightManager.onBillboardAppearEvent == null)
        {
            return;
        }
        UpsightManager.onBillboardAppearEvent(scope, contentAttributes);
    }
Exemple #2
0
    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);
    }
Exemple #3
0
 private void onBillboardAppearEvent(string scope, UpsightContentAttributes content)
 {
     Debug.Log((object)("onBillboardAppearEvent: scope=" + scope + ", content=" + (object)content));
 }
Exemple #4
0
 private void onBillboardAppearEvent(string scope, UpsightContentAttributes content)
 {
 }