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

Deleting and recreating a GameObject after it has registered it's listeners #23

Open
tomasnormand opened this issue Apr 20, 2018 · 1 comment

Comments

@tomasnormand
Copy link

So I have a game object that is created for handling the lobby chat. On Start it does DoOpen to set up the socket.on callbacks. If I leave the scene (so it gets destroyed) and then go back. The reference to the object is being stored somewhere and still receives the callbacks even though the gameobject itself has been destroyed. Is there a way to NOT cache the object reference or to remove the object form the list of listeners and re create them?

@usmanakram
Copy link

You should call "DoClose" method to close connection.

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

2 participants