I keep getting a prefab error

markrrrrrr

New member
I just purchased Ultimate Character Controller, and when I try to use it, I get a long series (88) of this error:

PPtr cast failed when dereferencing! Casting from PrefabInstance to Prefab!
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

If I ignore the errors, I can start the demo scene, but many of the floors are missing. I'm not sure what else is missing.

Oddly, I managed once to get almost everything to work, and I made it through the first few parts of your tutorial and also tried your demo scene. I don't know what's changed, but I haven't been able to get it to work again.

I've tried three different versions of Unity, including the most recent LTS version (Unity 2017.something), Unity 2018.3.3, and Unity 2018.3.4. I tried deleting the package file on my computer and downloading it again from the asset store.

I don't know if this will help in the diagnosis, but the only time I got the automatic pop-up of the main manager was the first (successful) run. I bring it up manually and update the buttons and layers, but I haven't found a way past the prefab errors.
 
Okay, I managed to get past it by selecting each of the assets that Unity was struggling with and in the "Model" pane of its inspector clicking "Fix now."

So I'm back to being blown away by the character controller, but I thought you might want to know about this issue. (I suppose it could be something I've caused, but I can't see how.)

I just purchased Ultimate Character Controller, and when I try to use it, I get a long series (88) of this error:

PPtr cast failed when dereferencing! Casting from PrefabInstance to Prefab!
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

If I ignore the errors, I can start the demo scene, but many of the floors are missing. I'm not sure what else is missing.

Oddly, I managed once to get almost everything to work, and I made it through the first few parts of your tutorial and also tried your demo scene. I don't know what's changed, but I haven't been able to get it to work again.

I've tried three different versions of Unity, including the most recent LTS version (Unity 2017.something), Unity 2018.3.3, and Unity 2018.3.4. I tried deleting the package file on my computer and downloading it again from the asset store.

I don't know if this will help in the diagnosis, but the only time I got the automatic pop-up of the main manager was the first (successful) run. I bring it up manually and update the buttons and layers, but I haven't found a way past the prefab errors.
 
What is the full stack trace of that error? The Ultimate Character Controller doesn't really do anything special with prefabs so it could be a bug within Unity's new prefab system.
 
I'm not sure how to find the full stack trace. Nothing further is shown in the console.

As far as I can tell though, clicking "Fix now" on all the models has resolved everything. The demo scene now seems to behave as expected.
 
Last edited:
I stand corrected. Although the demo scene behaves, I can't create functioning new characters in a new scene (in 2018.3). Even when I try just a no-rig FPS controller, the resultant character doesn't work correctly. It will spin and jump but not walk or run.

I went back to the LTS version of Unity 2017 and it seems to be fine. I've got a functioning character under my control and an AI NPC that so far seems to work correctly.

I think something in Unity's new prefab or package manager system is throwing a wrench in the works. And in case this helps with the diagnosis, even when I've had your demo scene running perfectly, I had to manually drag in the Monitors and the Virtual Controls. That's in 2018.3. In 2017 the Setup manager added them without issue.
 
This does sound like it's a Unity bug related to the new prefab system. If there are no Ultimate Character Controller methods printed to the stack trace (or if nothing else is shown, as what it sounds like) then I would report the bug to Unity so they can take a closer look.
 
Top