Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Sprite disappears after running

Discussion in 'Linux' started by trentsartain, Jun 5, 2016.

  1. trentsartain

    trentsartain

    Joined:
    Aug 10, 2014
    Posts:
    2
    I've worked with Unity for awhile, but I'm trying to switch over to Linux. It's possible I'm missing something completely.

    To reproduce:

    • Create a new 2D project.
    • Add a sprite to the scene (any shape)
    • (Optional) Click on the camera in the editor to see that the preview shows the sprite
    • Run the game
    • See that the sprite disappears.
    • Quit the game.
    • See that the sprite is still no longer being rendered in the editor (though the game object itself still exists).

    Any ideas?
     
  2. trentsartain

    trentsartain

    Joined:
    Aug 10, 2014
    Posts:
    2
    Found a quick fix: It looks like the default material is set to "None (Material)". Clicking the change button and changing it to "Sprites-Default" causes it to re-render and then it stays rendered. I don't remember having to do this with the Unity in Windows or OSX .
     
    unity_U2liQfgwkUxymw likes this.
  3. illuminait

    illuminait

    Joined:
    Apr 12, 2020
    Posts:
    1
    I know this is old, but it was near the top result. To fix it, I had to delete the sprites and start over. Maybe deleting the renderer and replacing it would work? I had 1 sprite and 3 empties with a collisionbox just vanish.
     
  4. Snap1050

    Snap1050

    Joined:
    Sep 8, 2020
    Posts:
    1
    I had to delete the sprites out of my animations to get it to show up
     
  5. Shadow777777

    Shadow777777

    Joined:
    Mar 26, 2021
    Posts:
    1
    hi I also have this same error I set the sprites to sprites-default and still the same error is showing does anyone know the solution. The sprite only disappears after I hook the sprite with code I Re-Checked the code 10 Times and No solution Please Anyone Help me
     
    LohQ and hollya like this.
  6. ryanjo

    ryanjo

    Unity Technologies

    Joined:
    Dec 14, 2018
    Posts:
    17
    Can you reproduce this behavior on Windows or does it only happen on Linux?

    Can you reproduce the same behavior if you build and run a standalone player?
     
  7. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    A bit of a necro on this post, but when you are coding be careful not to change any Image's alpha directly through the material. It's easy to grab the global material by mistake. And if the Image component has no material then you will be unknowingly modifying the Unity default sprite material asset, affecting all sprites even when you stop play...
     
  8. gabott

    gabott

    Joined:
    Feb 2, 2024
    Posts:
    1
    a mi me aparese este error en la consola
    Posición de la pantalla fuera de la vista frustum (pantalla pos 728.000000, 130.000000, 0.000000) (Cámara recta 0 0 1139 457)
    UnityEngine.GUIUtility rocessEvent (int,intptr,bool&)
    no se que hacerme solo me detecta la colición pero no aparese el personaje en Sprite renderer no me sala la imagen cuando ejecuto el juego solo aparese cuando no lo estoy ejecutando podrian ayudarme