Example #1
0
 void Update()
 {
     UItoken.color             = (string.IsNullOrEmpty(AccessToken) ? Color.red : Color.green);
     UItoken.text              = (string.IsNullOrEmpty(AccessToken) ? "Access Token missing" : "Access Token acquired");
     tweetNumberText.text      = "" + tweetNumberSlider.value;
     tweetNumberTextQuery.text = "" + tweetNumberSliderQuery.value;
     //Sometimes the instance value can be reset while editing scripts whilst in play mode from the editor
     if (!instance)
     {
         instance = this;
     }
 }
Example #2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        prototypeTwitterFunctions t = (prototypeTwitterFunctions)target;

        if (GUILayout.Button("Register Twitter App"))
        {
            Application.OpenURL("http://apps.twitter.com");
        }

        if (GUILayout.Button("Open REST API documentation"))
        {
            Application.OpenURL("http://dev.twitter.com/rest/reference");
        }

        if (GUILayout.Button("Get access token"))
        {
            t.GetAccessToken();
        }
    }
Example #3
0
 void Awake()
 {
     instance = this;
     GetAccessToken();
 }