Setup error handling improvements

mmaclaurin

New member
Hello, experienced game dev, first time user.

It seems like the setup could be much easier if common errors were handled better.

I'm just setting up for first time, so using the typical combination of read a little, try a little, etc.

First issue: I didn't want to use camera controller, and setup made it seem optional. (I just wanted to get the motion working first) However this led to 999+ errors as it tried to access the character from the controller object which had apparently been created anyway. Had to read the code to figure out why it was barfing. Seems like you could have caught this, emitted one warning, and disabled the camera controller. Would be a time saver and a confidence booster for new users.

Second issue: there's a checkbox for whether I want to use items, and I didn't. However, if you don't set this it will again error ever frame (somewhere in "reloadables.") Again, since your UI allows this choice, your code should deal with it and catch the error, emitting only a single warning.

Generally this philosophy of defensive coding lets people ease into your system without turning on every feature first.

Otherwise, it's looking interesting and I'm just getting started. I've spent years of my life on avatar systems and I like how comprehensive the system is looking as I don't want to rebuild all that myself :) I'll share any other newbie issues I find.
 
Getting this error after filling out everything I could find in the setup flow and reading all the directions.

Directions seems to make a lot of assumptions about what's already set up.

Anyway, error is "There is no look source attached to the character. Ensure the character has a look source attached (such as a camera)."

It would be really great if this actually explained what to DO. There are so many dozens of components all over the place not a single one I can find has a slot for a "look source." A more useful error would be of the form "Ensure the XYZ Component has a <needed class> in it's <name of UI field>"


Getting a little worried about how fragile this set up is. I'm sure it's great once it's all running but these errors are super-cryptic and it's been a long unpleasant saturday trying to make it work.



Error: There is no look source attached to the character. Ensure the character has a look source attached (such as a camera).
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.ThirdPersonController.Character.MovementTypes.RPG:GetDeltaYawRotation(Single, Single, Single, Single) (at Assets/Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Character/MovementTypes/RPG.cs:153)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler:GetDeltaYawRotation() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:196)
Opsive.UltimateCharacterController.Game.KinematicCharacter:Move(Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:224)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:FixedUpdate() (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:844)
 
1590903876084.png

This is a pretty bad UI. You're showing this to a new user who is just installing. You don't explain what any of this means.

a) Of course I have some custom layers. Every game does. Does this mean I should or shouldn't do this?
b) if I'm using custom layers I can say no? So why are we doing this at all?

I presume if I don't "update the project layers" something bad will happen. But if it overwrites my custom layers I know what will happen.

Pretty bad for the first five minutes of use.

The documentation is absolutely useless, explaining "This is recommended so the correct default layer names appear. " Recommended? Or required? Who cares what layer names "appear?" WHAT IS THE INTENDED FUNCTIONALITY AND HOW WILL IT CHANGE?


Of course the document just shows the dialog and repeats what's in it. You need to step back and realize that people don't know what you're talking about here (and many other areas of the UI.)
 
First issue: I didn't want to use camera controller, and setup made it seem optional. (I just wanted to get the motion working first) However this led to 999+ errors as it tried to access the character from the controller object which had apparently been created anyway. Had to read the code to figure out why it was barfing. Seems like you could have caught this, emitted one warning, and disabled the camera controller. Would be a time saver and a confidence booster for new users.
When you're just getting started I would start with these two videos:



All characters need a look source, whether it is the camera or in the case of an AI agent, a Local Look Source. If you don't want to use a camera controller are you wanting to create an AI agent or a networked character?

Second issue: there's a checkbox for whether I want to use items, and I didn't. However, if you don't set this it will again error ever frame (somewhere in "reloadables.") Again, since your UI allows this choice, your code should deal with it and catch the error, emitting only a single warning.
What is the stack trace? I just created a new character without any items and it worked.
 
a) Of course I have some custom layers. Every game does. Does this mean I should or shouldn't do this?
b) if I'm using custom layers I can say no? So why are we doing this at all?
I have expanded on the layer page of the documentation to give more details for what layers it sets up:


Hopefully this gives more details. Let me know if something still isn't clear.
 
So I restarted the whole process using a much cleaner avatar source and everything worked pretty painlessly.

A few quick thoughts:
- would be good to know which steps are mandatory. I saw "camera setup" button but thought it was optional, not mandatory.
- a "validate" button that checked that you had configured everything could be helpful
- some UI text to show which steps are mandatory would be helpful
- might be worth testing with some known bad models. it does seem to "just work" very nicely with clean humanoid setups, but the avatar I was trying with previously gave hit-or-miss results.
 
Glad things went smoother! I'll see what I can do to improve the in-text descriptions. Parts of it is tough because not everything is mandatory, for example setting up the camera controller is not mandatory if you are just using the character controller as an AI agent. A validate button is an interesting idea.

What does the bone configuration look like for the avatar that you are using? In general it should work with any humanoid character, though because the character proportions are different the animations will be more or less off depending on how close it is to the rig used in the demo scene.
 
Top