Multiple Model Character setup null ref exception

Hello,

I am wondering what the exact steps are for creating a character that uses the model switch capabilities? I am having problems and wondering if it's something I'm not doing right as the video skips right over it, and the screenshot in the documentation implies that it can be done. I have done the below steps exactly the same for both unity 2021.3.24 LTS and 2022.3 LTS with the same results.

1. create a new blank project
2. import version 3.0.11 of TPC
3. import synty pirate pack (I use this for the characters in my project, I want to make special note that I did try this with your characters atlas and rhea with the same results)
4. Drag two models to the scene. Character Main and Secondary we'll call them.
5. Drag the Main model to the "Character" slot of the Character Manager
6. Leave the Perspective on Third, Third Person Movement to Third Person Adventure, model type Humanoid, Animator controller, "Demo" (This is the demo controller included in the TPC) the Item Slots are greyed out so I cant change those but they are set to appropriate values.
7. Drag the Secondary model to the Character Model 2 slot.

This is where the problem happens and prevents me from properly creating a character. I get a null reference exception on line 740 of CharacterManager.cs

The only way that I have found to get a character mostly set up is to create a single model character first. Then, update it to include the second model. Which, I still get an index out of bounds exception, but it kind of works. The problem with this is that it doesn't add the physics components to the second model at all. It also doesn't add the object identifier's for the slots, and I'm guessing it's because of the exception?

Thanks for any help.
 
For my project, commenting out line 740 of CharacterManager.cs solves all the problems and allows me to create a two model character fully. Not sure if this is being used yet anywhere else but, I will update the thread when I find out.

thanks.
 
Last edited:
Top