Created
July 14, 2018 22:49
-
-
Save NullEntity/f7e600d4659b81b1b0da883ebfea4fd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void BindStateMachineBehavioursInActiveScenes() | |
{ | |
Enumerable.Range(0, SceneManager.sceneCount) | |
.Select(SceneManager.GetSceneAt) | |
.SelectMany(ZenUtilInternal.GetRootGameObjects) | |
.SelectMany(x => x.GetComponentsInChildren<Animator>(true)) | |
.SelectMany(x => x.GetBehaviours<StateMachineBehaviour>()) | |
.ForEach(Container.QueueForInject); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment