Jump to content

Recommended Posts

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...