Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Pause Menu Issue

Discussion in 'UGUI & TextMesh Pro' started by SP-Designs, Jun 13, 2016.

  1. SP-Designs

    SP-Designs

    Joined:
    Oct 13, 2015
    Posts:
    184
    Alright the UI component does pass onto the main scene and i added the script and did everything like you said.However, your concern was for good reason since i do get that # of fpc is 0 and i do get the warning from the controPlayer script so it cannot find the FPC gameobject for some reason!
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,521
    In the ControlPlayer script in this post, this line looks for a FirstPersonController component on an active GameObject in the scene:
    Code (csharp):
    1. var fpc = FindObjectOfType<UnityStandardAssets.Characters.FirstPerson.FirstPersonController>();
    There's not much to it. If it doesn't find a matching component, here are some possible reasons:
    • The GameObject with the component is deactivated, or
    • You're actually using a different FirstPersonController script, not the one whose full identifier is "UnityStandardAssets.Characters.FirstPerson.FirstPersonController".
    I'm going to be traveling for the next week, so I'm afraid I'm not going to be able to help you much more. I hope this at least got you a little farther along.
     
  3. SP-Designs

    SP-Designs

    Joined:
    Oct 13, 2015
    Posts:
    184
    The fps prefab that comes with this asset contains all of the included scripts and it does not get de-activated when the game starts so that should not be a problem.I will try to figure it out though because it's setting me back.Thanks a ton for your help,time and patience,i really really apreciate it! Have a nice holiday!