Artists‎ > ‎

Adding Clothes

Model Requirements

All clothing should be rigged using the same rig as the player model. It should contain multiple LODs, the lowest of which (usually LOD3) will be used for collision.

Your model can (and ideally will) only include the bones that your model is using.

Importing your model

Add your fbx model to Assets/Content/Player/Clothing/ in the appropriate folder (or make a new one if there is no appropriate folder).

In Unity find and select your model and change the rig to:


Switch to the Animations tab and make sure Import Animations is unchecked.



In the Model tab, ideally you aren't including materials with your model so make sure Import Materials is unchecked.


Creating the prefab

  1. Find your model
  2. Drag in into the scene
You should now have an object like this, named the same as your model.


You can rename this object whatever you want. If your object has an animator, remove it.

Your model might be untextured and stuff. So you need to set that up by creating the materials and importing the textures. I'm going to assume you already know how to do this.. but if not you can watch this being done in this video.

To convert your new object to a prefab, open the folder Resources/Prefabs/clothing/<bodypart>/ (where bodypart is the appropriate part for your item). Then do this. You should now have created a new clothes prefab.

You can now delete the gameobject you created in the hierarchy view - it's not needed anymore and won't affect the prefab you created.

Testing
Open up the PlayerModel scene.. make sure the Switch menu is set to Client + Server and press play.


Down the bottom left there are slots for shoes, hands, head, legs and torso. Click on whichever one you put your prefab in and select your prefab from the list.

You can right click in the scene and use WSAD to fly around. You can use left mouse button to zoom in and out. You can adjust the sun position with the slider at the bottom right and turn stuff on and off at the top left.


Committing

When committing make sure you include the .prefab file and the .meta files.

Editing

You can adjust and edit materials in the editor while playing. Changes to these will be automatically saved.

If you need to adjust the prefab you need to stop the game, return to the scene view and drag it into the scene. You can then edit it and pressing "apply" in the inspector window will apply your changes to the prefab - meaning you can delete it from the hierarchy view.
Comments