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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Prefab can't be replaced in Junior Programmer Challenge

Discussion in 'Editor & General Support' started by LizzieMcGuire, Dec 8, 2022.

  1. LizzieMcGuire

    LizzieMcGuire

    Joined:
    Sep 22, 2022
    Posts:
    6
    I am doing challenge 2 in the junior programmer course, where the player is spawning the ball instead of the dog, but needs to be spawning the dog. The answer seems to be to go into the inspector for PlayerControllerX and make sure that the dog prefab asset is assigned instead of the ball, but when I do this, the player still spawns the ball.

    It does have a note that says default references will only be applied in edit mode. But it seems like everyone online has only had to switch out the prefabs for it to work.
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,007
    You're applying it in the wrong place. You seem to be applying it to the script asset, but you need to find the component in the scene hierarchy and change the reference prefab there.
     
    LizzieMcGuire likes this.
  3. LizzieMcGuire

    LizzieMcGuire

    Joined:
    Sep 22, 2022
    Posts:
    6
    That worked, thank you so much!