コード例 #1
0
    public void DownloadEntryAssets(Entry entry, string serverURL)
    {
        // Check if Unity is supported
        //if (entry.getSupportedSDKs()[Entry.SDKs.UNITY.ordinal()])
        if (true)
        {
            // Get model hologram
            if (entry.getHologram().getType().Equals(Hologram.hologramType.MODEL_HOLOGRAM))
            {
                // Get model names and ID
                ModelHologram modelHologram  = (ModelHologram)entry.getHologram();
                string[]      filenames      = { modelHologram.getFilename(), modelHologram.getTextureFilename(), modelHologram.getMaterialFilename() };
                string[]      fileStorageIDs = { modelHologram.getStorageID(), modelHologram.getTextureStorageID(), modelHologram.getMaterialStorageID() };

                // Import Options
                ImportOptions importOptions = ParseAdditionalData(entry.getAdditionalData());

                // Download model files
                StartCoroutine(DownloadFiles(entry, serverURL, filenames, fileStorageIDs, importOptions));
            }
        }
    }