Runtime Error

Hello, I am getting a strange error and wondering if anyone has seen it. It only happens when I do a stand alone build (i.e. not in the Unity editor). Everything works perfectly while running in the editor but as soon as I do a build and try to run it I get this error from the console:

Error: the character CapsuleCollider (UnityEngine.GameObject) doesn't have the Ultimate Character Locomotion component.

Line 208 of CameraController.cs.

I instantiate my player character in the previous scene and have it don't destroy on load so it is available for the game scene. The part I don't get is why does it work in the editor, but not as a stand alone build? I have a character selection scene that instantiates the character and then loads the game scene. This has been working just fine until I decided to do a build.

I tried having a character in the game scene already and this doesn't work either. I get the same error.
 
I think I figured it out. I have more testing to do, but I am using Quest Machine, and the triggers for that rely on the capsule collider to be tagged as Player to work. But, this is what is seemingly causing this problem, but why only for a build?

Is there a preprocessor directive somewhere excluding/including code?
 
I have it figured out. I ended up creating a new tag called PlayerCollider and setting the characters Capsule Collider to this tag. Then, using the Quest Machine's Trigger Event tag mask, I use this new tag for the triggers.

I am still very curious as to why it only happens on a build and not in the editor.
 
Top