コード例 #1
0
ファイル: GLTFImporter.cs プロジェクト: takhlaq/GLTFUtility
        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);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: GLBImporter.cs プロジェクト: Siccity/GLTFUtility
        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);
        }
コード例 #4
0
ファイル: GLBImporter.cs プロジェクト: BrandXR/GLTFUtility
 private void onFinished(GameObject root, AnimationClip[] animations)
 {
     // Save asset
     GLTFAssetUtility.SaveToAsset(root, animations, ctx);
 }