public void loadFromBuffer(byte[] data) { if (!GLTFUtils.isFolderInProjectDirectory(_importDirectory)) { Debug.LogError("Import directory is outside of project directory. Please select path in Assets/"); return; } if (!Directory.Exists(_importDirectory)) { Directory.CreateDirectory(_importDirectory); } _gltfInput = unzipGLTFArchiveData(data); _importer.setupForPath(_gltfInput, _importDirectory, _currentSampleName, _addToCurrentScene); _importer.Load(); }
private void processImportButton() { if (!isDirectoryInProject()) { Debug.LogError("Import directory is outside of project directory. Please select path in Assets/"); return; } if (!Directory.Exists(_projectDirectory)) { Directory.CreateDirectory(_projectDirectory); } if (Path.GetExtension(_gltfPath) == ".zip") { _gltfPath = unzipGltfArchive(_gltfPath); } _importer.setupForPath(_gltfPath, _projectDirectory, _currentSampleName); _importer.Load(); }