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?
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?