Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
 private void onFinished(GameObject root, AnimationClip[] animations)
 {
     // Save asset
     GLTFAssetUtility.SaveToAsset(root, animations, ctx);
 }