rolle Posted July 5, 2014 Share Posted July 5, 2014 I need some teardown code to run when playercontroller is destroyed. I tried adding it in PlayerController:OnRemoveEntity, but this code never seems to be called. If I dont add my teardown code the game crashes without log printouts when going to main menu. I would assume it is related to the controller being GC:ed and I use some win32 threads and other un-friendly code. Is there any general way to handle tear-down code for components? I guess I could do some hacky stuff as listening for a quit and save and then do the teardown, but would like to avoid this. Link to comment https://forums.kleientertainment.com/forums/topic/38051-teardown-code-for-playercontroller/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now