// UI
        void OnGUI()
        {
            checkValidity();
            SketchfabPlugin.displayHeader();

            if (_currentUid.Length > 0)
            {
                displaySeparatedModelPage();
            }

            displaySearchOptions();
            displayNextPrev();
            _scrollView = GUILayout.BeginScrollView(_scrollView);
            displayResults();
            GUILayout.EndScrollView();

            if (_searchInIndex == SEARCH_IN.MY_STORE_PURCHASES && !_browserManager.hasResults())
            {
                if (_query.Length > 0)
                {
                    displayCenteredMessage("There is no result for '" + _query + "' in your purchases.");
                }
                else
                {
                    displayCenteredMessage("It looks like you didn't do any purchase yet on Sketchfab Store");
                }
            }

            if (_searchInIndex == SEARCH_IN.MY_MODELS && _logger.isUserLogged() && !_logger.canAccessOwnModels())
            {
                if (_query.Length > 0)
                {
                    displayCenteredMessage("There is no result for '" + _query + "' in your .");
                }
                else
                {
                    displayCenteredMessage("It look like you don't have any model or your plan doesn't allow you to access them");
                }

                displayFooter();
            }

            SketchfabPlugin.displayFooter();
        }
        private bool updateExporterStatus()
        {
            status = "";

            if (!_logger.isUserLogged())
            {
                status = "You need to be logged to upload";
                return(false);
            }

            if (param_name.Length > SketchfabPlugin.NAME_LIMIT)
            {
                status = "Model name is too long";
                return(false);
            }

            if (param_name.Length == 0)
            {
                status = "Please give a name to your model";
                return(false);
            }


            if (param_description.Length > SketchfabPlugin.DESC_LIMIT)
            {
                status = "Model description is too long";
                return(false);
            }


            if (param_tags.Length > SketchfabPlugin.TAGS_LIMIT)
            {
                status = "Model tags are too long";
                return(false);
            }

            if (opt_exportSelection)
            {
                if (Selection.GetTransforms(SelectionMode.Deep).Length == 0)
                {
                    status = "No object selected to export";
                    return(false);
                }
                else
                {
                    status = "Upload selection to Sketchfab";
                }
            }
            else
            {
                status = "Upload scene to Sketchfab";
            }

            return(true);
        }
Exemple #3
0
        // UI
        void OnGUI()
        {
            checkValidity();
            SketchfabPlugin.displayHeader();

            if (_currentUid.Length > 0)
            {
                displaySeparatedModelPage();
            }

            displaySearchOptions();
            displayNextPrev();
            _scrollView = GUILayout.BeginScrollView(_scrollView);
            displayResults();
            GUILayout.EndScrollView();
            if (_myModels && _logger.isUserLogged() && !_logger.canAccessOwnModels())
            {
                displayUpgradeToPro();
            }


            SketchfabPlugin.displayFooter();
        }