// Manager integrity and reset private void checkValidity() { SketchfabPlugin.checkValidity(); if (_api == null) { _api = SketchfabPlugin.getAPI(); } if (_resultUids == null) { _resultUids = new List <string>(); } if (_sketchfabModels == null) { _sketchfabModels = new Dictionary <string, SketchfabModel>(); } if (_categories == null) { fetchCategories(); } if (_importer == null) { _importer = new SketchfabImporter(ImportProgress, ImportFinish); } }
// 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 SketchfabAPI getAPI() { if (_api == null) { _api = new SketchfabAPI(); } return(_api); }
void setupAPI() { _api = new Sketchfab.SketchfabAPI("Unity-exporter"); //Setup callbacks _api.setCheckVersionSuccessCb(OnCheckVersionSuccess); _api.setCheckVersionFailedCb(OnCheckVersionFailure); _api.checkLatestExporterVersion(); }
void setupAPI() { _api = new Sketchfab.SketchfabAPI("Unity-exporter"); //Setup callbacks _api.setCheckVersionSuccessCb(OnCheckVersionSuccess); _api.setCheckVersionFailedCb(OnCheckVersionFailure); _api.setTokenRequestFailedCb(OnAuthenticationFail); _api.setTokenRequestSuccessCb(OnAuthenticationSuccess); _api.setCheckUserAccountSuccessCb(OnCheckUserAccountSuccess); _api.setUploadSuccessCb(OnUploadSuccess); _api.setUploadFailedCb(OnUploadFailed); _api.checkLatestExporterVersion(); }
private void checkValidity() { if (_ui == null) { _ui = SketchfabPlugin.getUI(); } if (_api == null) { _api = SketchfabPlugin.getAPI(); } if (_logger == null) { _logger = SketchfabPlugin.getLogger(); } }
// Manager integrity and reset private void checkValidity() { SketchfabPlugin.checkValidity(); if (_api == null) { _api = SketchfabPlugin.getAPI(); } if (_sketchfabModels == null) { _sketchfabModels = new OrderedDictionary(); } if (_categories == null) { fetchCategories(); } if (_importer == null) { _importer = new SketchfabImporter(ImportProgress, ImportFinish); } }