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

Help with issue with sprite spawner

Discussion in 'Scripting' started by Kibllex, Jul 14, 2019.

  1. Kibllex

    Kibllex

    Joined:
    Jul 14, 2019
    Posts:
    8
    i am following this video tutorial for a 2d endless runner. the tutorial goes through how to make a spawner using the script and then he places the sprite in the script to spawn it.
    i'll post the video with the timestamp for the problem that i am talking about, but i'll also explain how it looks from my end.

    the issue occurs just around 4:45 when he drags the sprite into the script.

    how it is on my end is that i follow the spawn script exactly, and it looks the same way. the problem is that it will only allow me to spawn sprites that i have already place on the scene, and not sprites that are in my assets folder but not placed on the scene.
    in the image below you can see that i pressed the icon to let me select sprites to use as the game object in the spawn script. it shows me the tab for stuff that i have in the scene and it successfully shows all sprites on the scene. when i switch to the assets tab it just shows none.

     
  2. Kibllex

    Kibllex

    Joined:
    Jul 14, 2019
    Posts:
    8
    because the sprite on the scene that i wanted to spawn was edited, i needed to drag the edited sprite from the assets list in the scene tab and add it to my project assets folder.

    i'm sure that this advice will help everyone in the future since nobody knew about this perplexing conundrum. no need to thank me.