Why is my Raycast parenting resetting after build?
Hi, I've been troubleshooting an issue for some time now, but I can't manage to figure it out.
I'm attempting to build a "Google VR" (Cardboard) FPS game. I'm using the default Unity "FPS Controller".
Basically, the "FirstPersonCharacter" (MainCamera) has a "GVR Viewer Main" Prefab as a child. It also has some Transforms (Zones) as children (ex. "FireballSpawnZone", "RaycastTransform").
So, everything was working fine (Raycast was attached (child of) MainCamera, and the Ray would follow the camera movement) But, if I reuse this Player in another scene, or if I build out the project, the Raycast appears to lose it's "Childing" to the Camera, & for some reason it seems to be a Child to the "FPS Controller" instead.
In other words, initially, the Raycast points wherever I'm looking (attached to head). Then, when I test the build, the Raycast suddenly points North (attached to chest), it now follows my position, but not my head movement, or Rotation.
Oddly enough, if I duplicate the whole FPS Controller, delete the previous one, it works fine again, until I build it out. It's a mystery! any help would be greatly appreciated!
Thanks in advance.