Beispiel #1
0
 // Logger needs API to check login
 // so initialize API before Logger
 public static void Initialize()
 {
     _ui     = new SketchfabUI();
     _api    = new SketchfabAPI();
     _logger = new SketchfabLogger();
     checkUpdates();
     DEFAULT_AVATAR = Resources.Load("defaultAvatar") as Texture2D;
 }
        public static SketchfabLogger getLogger()
        {
            if (_logger == null)
            {
                _logger = new SketchfabLogger();
            }

            return(_logger);
        }
 private void checkValidity()
 {
     if (_ui == null)
     {
         _ui = SketchfabPlugin.getUI();
     }
     if (_api == null)
     {
         _api = SketchfabPlugin.getAPI();
     }
     if (_logger == null)
     {
         _logger = SketchfabPlugin.getLogger();
     }
 }
Beispiel #4
0
        private void checkValidity()
        {
            if (_browserManager == null)
            {
                _browserManager = new SketchfabBrowserManager(OnRefreshUpdate, true);
                resetFilters();
                _currentUid      = "";
                _categoryName    = "";
                _categoriesNames = new string[0];

                // Setup sortBy
                _sortBy    = new string[] { "Relevance", "Likes", "Views", "Recent" };
                _polyCount = new string[] { "Any", "Up to 10k", "10k to 50k", "50k to 100k", "100k to 250k", "250k +" };
                this.Repaint();
                GL.sRGBWrite = true;
            }

            SketchfabPlugin.checkValidity();
            _ui     = SketchfabPlugin.getUI();
            _logger = SketchfabPlugin.getLogger();
        }
        private void checkValidity()
        {
            if (_browserManager == null)
            {
                _browserManager = new SketchfabBrowserManager(OnRefreshUpdate, true);
                resetFilters();
                _currentUid      = "";
                _categoryName    = "";
                _categoriesNames = new string[0];

                // Setup sortBy
                _sortBy    = new string[] { "Relevance", "Likes", "Views", "Recent" };
                _polyCount = new string[] { "Any", "Up to 10k", "10k to 50k", "50k to 100k", "100k to 250k", "250k +" };
                _searchIn  = new string[] { "free downloadable", "my models", "store purchases" };
                _license   = new string[] { "any", "CC BY", "CC BY SA", "CC BY-ND", "CC BY-NC", "CC BY-NC-SA", "CC BY-NC-ND", "CC0" };               // No search for store models so only CC licenses here
                this.Repaint();
                GL.sRGBWrite = true;
            }

            SketchfabPlugin.checkValidity();
            _ui     = SketchfabPlugin.getUI();
            _logger = SketchfabPlugin.getLogger();
        }