Esempio n. 1
0
 void Start()
 {
     ImageBrowser.OnPicked += (image) =>
     {
         StartCoroutine(LoadTexture(image));
     };
     ImageBrowser.Pick();
 }
Esempio n. 2
0
    void OnGUI()
    {
        GUILayout.BeginArea(new Rect(10, 10, Screen.width - 20, Screen.height - 20));
        GUI.skin.button.fixedHeight   = (Screen.height - 20) / 12;
        GUI.skin.button.fixedWidth    = (Screen.width - 20) / 4;
        GUI.skin.textArea.fixedHeight = (Screen.height - 20) / 3 - 20 - GUI.skin.button.fixedHeight / 3;

        GUILayout.BeginHorizontal();
        {
            if (GUILayout.Button("Pick Video"))
            {
                VideoBrowser.Pick();
            }
            GUILayout.TextArea(_video);
        }
        GUILayout.EndHorizontal();
        GUILayout.Space(20);

        GUILayout.BeginHorizontal();
        {
            if (GUILayout.Button("Pick Audio"))
            {
                AudioBrowser.Pick();
            }
            GUILayout.TextArea(_audio);
        }
        GUILayout.EndHorizontal();
        GUILayout.Space(20);

        GUILayout.BeginHorizontal();
        {
            if (GUILayout.Button("Pick Image"))
            {
                ImageBrowser.Pick();
            }
            GUILayout.TextArea(_image);
        }
        GUILayout.EndHorizontal();
        GUILayout.Space(20);

        GUI.skin.button.fixedWidth = Screen.width - 20;
        if (GUILayout.Button("Exit"))
        {
            Application.Quit();
        }

        GUILayout.EndArea();
    }