I’m trying to create an empty space (a full screen default window set to black) that only needs to display one 3d model at a time chosen by a user from a menu. I have tried using the DirectOptionMenu, and have been able to get the menu to load models how I want, but I can’t figure out a way to unload the previous model when a new selection is made from the menu. I’ve run into two problems: (1) while loader.load_model works, for some reason loader.unload_model does not and (2) because the options are user selected I can’t predict which menu option they will choose and therefore can’t put any specific model into loader.unload_model(specificModel). I’ve tried creating something like:
currentModel = ()
if arg == ‘example1’
currentModel = example1
model = loader.load_model(currentModel)
but it didn’t solve my problem. Does anyone know how to unload and load models with a single menu selection? Thanks y’all!
(edit: when I posted this it took out the indentations from my example. Assume I indented correctly and that is not part of the problem.)