hi, I need help. I’m creating a project that dynamically loads a 3D model. This model has more mesh. For example:
Body (it’s Model 3D) with mesh list (thus appears in the panel hierarchy)
liver
heart
lungs
skin
ecc…
(In attached files the model “Completo”, and the mesh “aorta”, “polmoni”, “fegato”, “milza”, ecc)
When i load the model, I need to dynamically create a menu with the names of the mesh, because the user must interact with the parts of the model. How can I do? I’m using c#.
I don’t know if this will work for sure because I’m not 100% sure what your doing but if you just want the menu to display the names of the bones or organs I would do this (Note: this may not be the best way to do it)
First I would make a script to check if the model has been loaded if so in script find the root and make a int variable that store how many child elements it has then make a generic list to store them then make a for loop or for each loop to get the name of each child element then in your menu script set the number or buttons equal to the number of child elements of the root bone and then make that many string variables and use another for loop to set each string to the corresponding name of the child element in the list of child elements.