The second occurrence of the event is ignored

Hi everyone

I want to repeat automatic creation and deletion of buttons.
However, the second occurrence of the event is ignored.

Please check out Create Button2 and Remove button.

Thank you

Hey there, it looks like the problem is that you were only disposing the button. E.G. instead you can just call dispose on the plane and pass true for the second param to dispose the material and texture that were created for it by CreateForMesh.

Thank you :smile:

Your welcome, ooh and I should also mention I used the Inspector to make it easy to see what’s being created and disposed when the buttons are clicked. :slight_smile: