Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot unbind a signal during the execution of its Listener delegate #3

Open
DanMacDonald opened this issue Dec 4, 2019 · 0 comments
Assignees

Comments

@DanMacDonald
Copy link
Owner

DanMacDonald commented Dec 4, 2019

[ListenTo(typeof(SessionInitializedSignal))]
public void OnSessionInitializedSignal (ChessyGameSession session) {

	if (session.gameType != ChessyGameController.GameTypeEnum.NoMoveBonus)
		StartCoroutine(WaitToUnbind()); // Unbinding during a signal handler doesn't work :(

Make this kind of code unneccessary.
Should be able to call SignalManager.Unbind(this) within the listener method.

@DanMacDonald DanMacDonald self-assigned this Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant