Hello! So I am soon going to be working on a feature which will allow players to either pick different textures for various body parts of the character they are playing with or let the system choose something for them at random. The textures are stored in separate scriptable objects for each character and they are stored in a way that there is a category(head, body, legs etc.) which acts as the key and contains all the textures that can be applied to the relevant body part. I have two approaches I want to go with at the moment for the bit where I find out which body parts are capable of switching textures and what body part that is -
- The first is more data driven in that each body part will be assigned a part ID in the form of a scriptable object and then textures are picked from the scriptable object based on that part ID.
- The second approach is basically just retreiving the names of all the mesh renderers on any given character and use that to pick the textures from the dictionary. This obviously involves a very strict pipeline of importing assets provided by the art team into Unity basically asking them to make sure to get the names of the body parts right etc.
My question is which of these approaches sound more scalable to people or is there is a third approach that works better for this. For some context, the project is still very much in prototyping phase so we don’t know how many different body parts or how many different characters the game is going to end up having. I know this can warrant more information or a wider discussion but let’s leave that to your judgement and how you interpret things given what I have said because even I don’t know enough at the moment. This will be on mobile though if that changes anything.
Any help would be very much appreciated.