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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Sprite Material vanishes upon hitting Play

Discussion in '5.4 Beta' started by JayJennings, May 8, 2016.

  1. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    This afternoon I added another sprite to my 2D game and this time when I hit Play the sprite vanished. Turns out the Sprite Renderer > Material is being changed to None (even if I save the scene before hitting Play).

    If I manually change the Material back to Sprite - Default then everything is back to normal and it works fine when I hit Play.

    What's (especially) odd is that previously today dragging sprites into the game worked just fine -- I don't recall doing anything "weird" that made the problem crop up.

    Jay

    PS - Using 5.4.0b17 on Mac, and quitting and restarting Unity didn't fix the problem. Only manually resetting the Material fixes it.
     
  2. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    Follow-Up:

    It appears the problem is that the default Sprite Renderer > Material that's put in when I drag an image into the scene is Sprites/Default but the one that's in the Materials picker is Sprites-Default. So I think it's looking for the one with the slash and when it doesn't find that it just blanks out the field, requiring you to manually set it.

    Just in case someone wants to fix that... :)

    Jay