public static PlayableDirector[] GetDirectorsInSceneUsingAsset(PlayableAsset asset)
        {
            List <PlayableDirector> list = new List <PlayableDirector>();

            PlayableDirector[] array  = Resources.FindObjectsOfTypeAll(typeof(PlayableDirector)) as PlayableDirector[];
            PlayableDirector[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                PlayableDirector playableDirector = array2[i];
                if ((playableDirector.get_hideFlags() & 15) == null)
                {
                    string assetPath = AssetDatabase.GetAssetPath(playableDirector.get_transform().get_root().get_gameObject());
                    if (string.IsNullOrEmpty(assetPath))
                    {
                        if (asset == null || (asset != null && playableDirector.get_playableAsset() == asset))
                        {
                            list.Add(playableDirector);
                        }
                    }
                }
            }
            return(list.ToArray());
        }