I am currently developing an online multiplayer game on Unity. In the game, the character of each player will be assigned its mesh after the game receives parameters (their meshes' names) for each character from the server. Assigning each character's mesh can happen after the main scene is loaded. I am wondering whether:

  1. I should make each character's object the same by having every mesh possible loaded into it and only activate the corresponding mesh for that player.
  2. I should create a class that holds every mesh possible (like, mesh manager) and tell each character to use its mesh from that class.
  3. I should delay the characters' meshes loading to wait for the parameter from the server first. Then, load the mesh after the scene has been loaded.

I am not sure if specific assets can be loaded outside of its scene in Unity. If anyone has any different solutions, feel free to suggest. Thanks in advance.

  • \$\begingroup\$ Have you considered having just one mesh renderer, then just switching the mesh asset specified in the mesh filter component? That would let you show a default appearance until the correct one is ready. \$\endgroup\$
    – DMGregory
    Nov 5, 2019 at 14:48
  • \$\begingroup\$ @DMGregory Oh, I forgot I can switch it this way other than a disabling and activating the prefabs. Thanks for the tip. I still wonder how should I load those meshes though. \$\endgroup\$
    – ruiyl
    Nov 5, 2019 at 15:04
  • \$\begingroup\$ What did you try so far? For instance, did you try using the new addressable asset approach? \$\endgroup\$
    – DMGregory
    Nov 5, 2019 at 15:10
  • \$\begingroup\$ @DMGregory The current implementation is the 1st approach with the prefab enable/disable. I think there is a way to improve it. Thus, here I am. Will look into the Addressable Asset you mentioned. \$\endgroup\$
    – ruiyl
    Nov 5, 2019 at 16:28


You must log in to answer this question.

Browse other questions tagged .