Пример #1
0
    public void Load()
    {
        Debug.Log("CERN archive loading from path: " + jsonPath);
        if (loadImages)
        {
            images = LoadJson <ImageList>(jsonPath + "/files.json");
            images.PrepareData();
            Debug.Log("CERN Images loaded: " + images.items.Length);
        }
        if (loadRecords)
        {
            records = LoadJson <RecordList>(jsonPath + "/records.json");
            records.PrepareData();
            Debug.Log("CERN Records loaded: " + records.items.Length);
        }
        if (loadAuthors)
        {
            authors = LoadJson <AuthorList>(jsonPath + "/authors.json");
            authors.PrepareData();
            Debug.Log("CERN Authors loaded: " + authors.items.Length);
        }
        if (loadKeywords)
        {
            keywords = LoadJson <KeywordList>(jsonPath + "/keywords.json");
            keywords.PrepareData();
            Debug.Log("CERN Keywords loaded: " + keywords.items.Length);
        }
        if (loadSubjects)
        {
            subjects = LoadJson <SubjectList>(jsonPath + "/subjects.json");
            subjects.PrepareData();
            Debug.Log("CERN Subjects loaded: " + subjects.items.Length);
        }
        if (loadCopyrightHolders)
        {
            copyrightHolders = LoadJson <CopyrightHolderList>(jsonPath + "/copyright.json");
            copyrightHolders.PrepareData();
            Debug.Log("CERN CopyrightHolders loaded: " + copyrightHolders.items.Length);
        }
        if (loadCollections)
        {
            collections = LoadJson <CollectionList>(jsonPath + "/collections.json");
            collections.PrepareData();
            Debug.Log("CERN Collections loaded: " + collections.items.Length);
        }

        dataLoaded = true;
    }