asmadsen / react-native-unity-view

MIT License
204 stars 128 forks source link

unload unity on unmount #16

Open rakirox opened 4 years ago

rakirox commented 4 years ago

Adds optional boolean prop unloadOnUnmount to UnityView which unloads all unity scenes but not game preparation. this is an optimization for the next run of your game which will be faster. And releases all scenes' memory.

Also, it expose unloadPlayer so you can manually decide when to unload all scenes.

Notes:

TruAmbition commented 1 year ago

Hey @rakirox, I hope this finds you well. Thank you so much for jumping in and taking this on. I would like to ask, did you ever get around to solving this for iOS? I'm having a heck of a time trying to maneuver the best way I can within unity to unload assets, GC but still can't clear ~500MB of men post Unity scene runtime.

please advise,