public override void OnImportAsset(AssetImportContext ctx) { // Load asset GLTFAnimation.ImportResult[] animations; GameObject root = Importer.ImportGLTF(ctx.assetPath, importSettings, out animations); // Save asset GLTFAssetUtility.SaveToAsset(root, animations, ctx); }
public override void OnImportAsset(UnityEditor.AssetImporters.AssetImportContext ctx) { // Load asset GLTFAnimation.ImportResult[] animations; GameObject root = Importer.LoadFromFile(ctx.assetPath, importSettings, out animations, Format.GLTF); // Save asset GLTFAssetUtility.SaveToAsset(root, animations, ctx); }
public override void OnImportAsset(AssetImportContext ctx) { // Load asset AnimationClip[] animations; if (importSettings == null) { importSettings = new ImportSettings(); } GameObject root = Importer.LoadFromFile(ctx.assetPath, importSettings, out animations, Format.GLB); // Save asset GLTFAssetUtility.SaveToAsset(root, animations, ctx, importSettings); }
private void onFinished(GameObject root, AnimationClip[] animations) { // Save asset GLTFAssetUtility.SaveToAsset(root, animations, ctx); }