- Home /
Create/destroy 3d object on coded button.
I am trying to make a button or a selection box on a GUI that creates or destroys a 3d object (or series of objects) I have a male and female model and simply want to switch between the two quickly. Should i just lode another level with the same scripts running or am i correct on thinking its better to create and destroy the objects via a button ?
Answer by ThomasVandenberghe · Apr 08, 2015 at 01:26 PM
The best approach would probably be to put them both in 1 scene and switch between them using gameObject.SetActive(true/false). It's a lot faster than loading scenes or instantiating objects.
Your answer
![](https://koobas.hobune.stream/wayback/20220613192534im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Button on Panel is not responding 1 Answer
How to create a UIToolkit Flashing button 0 Answers
Add selection in GraphView via code 1 Answer
button drawn last not triggered 0 Answers
RPG Maker style menu with UI buttons that are selected by controller 0 Answers