Disappearing Character

devomage

Member
I have an "Init" scene that has a UCC camera on it and is set to DontDestroyOnLoad(). The next scene is "Lobby" that has 5 Agent characters that represent each of the character models the player can have. When I hit play, these models are randomly Invisible. I can make them appear by double clicking it's Transform in the Hierarchy. I've fixed the problem by Instantiating them as prefabs - however, I'd rather not do it like this. Posting this here because I've exhausted all the ideas on Discord and suspect this thread might be related.
 
This sounds like it is some sort of a culling issue. Unless your character is being faded using the ObjectFader component there isn't anything within UCC which will make the characters disappear in the game view.
 
Justin are you sure? I'm having a similar problem. I removed everything having to do with UCC in my project and imported 2.1.5 (up from 2.1.4). Everything was fine with 2.1.4. After installing 2.1.5 my characters began to disappear. I removed all of them and brought in Nolan and turned him into an NPC. In scene view he looks like a normal NPC. When the scene starts he disappears and his collider is all messed up. I have culling mask is set to everything on the main camera. I have a back up project with 2.1.4 and all the characters are fine.3.JPG4.JPG
 
Is your Camera/Character a prefab or already in the scene? Are you using multiple scenes?

I'm ignoring the issue for now and spawned an Agent rather than a Character. I'm about to revisit this in a few days; details might be helpful.
 
I believe I have found a possible bug. I have tried this with two fresh projects using Unity 2019.1.f1 and UCC 2.1.5. I've also tried this with an older project with a preexisting and new scene. The problem is that when the scene starts, under certain conditions, the AI character disappears. These are the steps to reproduce:

Setup:

1) Start a new project and import UCC
2) Update Buttons and Layers
3) Add Managers and Camera (set to first person combat)
4) Create a Plain and set the transform XYZ to 0,0,0 and scale it to 30,30,30
4) Drag Nolan into the hierarchy and make sure the transform XYZ is set to 0,0,0 as well as rotation set to 0,0,0
5) Set up Nolan as an AI without NavMesh in Third Person by dragging Nolan from the Hierarchy in the Character Manager. Set to Third Person Adventure.
6) Create a First Person Character with no Animator. Set to First Person Combat
7) Place the FPC 3 units from Nolan (Nolan should be at 0,0,0). The FPC should be at (0,0,3)
8) Rotate the FPC 180(Y) so he is facing Nolan

At the point when the scene is run the FPC sees Nolan right in front of him and the the scene runs normally.

Reproduce:

1) Set the scene and game windows so you can see both
2) Select both FPC and Nolan and drag along the positive X maybe 10 units and run the scene
3) If the scene behaves normally then exit the scene and move both another ten or twenty units on the positive X
4) Keep repeating step 3 until Nolan disappears. This may be 10 units or it maybe 150. It is different with each new project and new scene within a project
5) Once Nolan disappears (while the scene is running) turn the FPC 180 away from Nolan and he will reappear in scene view. After a full 360 Nolan can be seen again and the game window.
6) This behavior can be seen when moving both characters along the negative X as well as the positive Z. For some reason I have not been able to reproduce on the negative Z.
7) As I said, for each project/scene the distance from 0,0,0 varies by a little or a lot. Whatever that spot is, moving both closer to 0,0,0 will eventually solve the problem.

This can also be observed when using a terrain. Steps taken to resolve:

Uninstalled/Installed Unity
Removed UCC and reimported (from current projects with other assets installed)
Started two different fresh projects with only UCC in the scene.

If anyone else can reproduce, please post.
 
Last edited:
When you say that Nolan disappears, do you mean the mesh goes transparent or the character doesn't render? You don't have an Object Fader component on the camera, do you? Beyond the Object Fader componet UCC doesn't include any code that hides the character so this sounds like it is occlusion related.
 
Nolan doesn't render. I do not have the Object Fader Component attached. Have you tried repeating the steps? I've attached the scene using the above steps.
 

Attachments

  • Scene4.zip
    19.1 KB · Views: 1
Last edited:
I wasn't able to get Nolan to disappear but this does look culling related. As a failsafe on the Animator you could have Nolan Always Animate instead of Cull Update Transforms.
 
Perhaps this will help track down the problem. In the cases when Nolan does not appear (not rendered) the scene begin with his transform way away from him. Once my player turns 180 away from Nolan the transform snaps back to Nolan and he is now visible after I do a complete 360. Although I have not been able to capture this with a screen shot because it happens so fast, with Nolan's transform out of place his body is stretched from his current position to the out of place transform. I can only see this in Scene view. This happens until I move the mouse. Upon moving the mouse this stretching behavior will cease however
 

Attachments

  • Capture.JPG
    Capture.JPG
    322.7 KB · Views: 5
Top