// ================================================================================
        //  private methods
        // --------------------------------------------------------------------------------

        private static void MarkAssetForImport(string asset, List <string> markedAssets)
        {
            AnimationImporter importer = AnimationImporter.Instance;

            if (!importer.canImportAnimations)
            {
                return;
            }

            if (importer.HasExistingAnimatorController(asset) ||
                importer.HasExistingAnimatorOverrideController(asset))
            {
                markedAssets.Add(asset);
            }
        }
        private static void ImportAssets()
        {
            // Unsubscribe from callback
            EditorApplication.update = Delegate.Remove(EditorApplication.update, _importDelegate as EditorApplication.CallbackFunction) as EditorApplication.CallbackFunction;

            AssetDatabase.Refresh();
            AnimationImporter importer = AnimationImporter.Instance;

            foreach (var item in _assetsMarkedForImport)
            {
                if (item == null)
                {
                    continue;
                }

                if (importer.HasExistingAnimatorController(item))
                {
                    var animationInfo = importer.CreateAnimationsForAssetFile(item);

                    if (animationInfo != null)
                    {
                        importer.CreateAnimatorController(animationInfo);
                    }
                }
                else if (importer.HasExistingAnimatorOverrideController(item))
                {
                    var animationInfo = importer.CreateAnimationsForAssetFile(item);

                    if (animationInfo != null)
                    {
                        importer.CreateAnimatorOverrideController(animationInfo, true);
                    }
                }
            }

            _assetsMarkedForImport.Clear();
        }