1
\$\begingroup\$

I'm making a game with customization system for both characters and weapons and I don't know exactly what's the best way of doing the customizations themselves. I'm thinking of creating separate prefabs for every item that can't be dismantaled.

For example, I'd make a prefab of a character (naked-ish) and place empty game objects as containers for clothes and equipment on the character pref. When a player'd change helmet or something else, I'd replace the old helmet pref with a new one saving the data to an XML or Json file. Then I'd pass this Json or XML to a level and a script on the level will assemble this character with all its stuff taking the info from the XML or Json file.

So, the question is: is that a good approach or is there a better or common way to do this taking into account that pretty much the same should work in multiplayer but with data passed via connection? If so, what are the security measures to take in multiplayer?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.