Player sprite turns to black when I try to move it.

Hi, I’ve been working on a 2D brawler and I need to use a new material for my sprites so that I can use my own lighting. Since I changed the material whenever I move my player the sprite changes to black.

Even with a light pointing right at the scene the sprite will still turn to black.

I am using the Sprites/Diffuse shader and I have changed nothing else from default.(there doesn’t seem to be any options on the material??) I couldn’t find anything on the internet. Has anyone had any experience with something like this?

I hope this isn’t too late :confused: I just found the answer myself!
In your code on the player you probably have code changing the localscale:

GetComponent<Transform> ().localScale = new Vector2 (1, 1);

and

GetComponent<Transform> ().localScale = new Vector2 (-1, 1);

Instead, make sure you are setting the scale to a Vector3 with a third 1

GetComponent<Transform> ().localScale = new Vector3 (1, 1, 1);

and

GetComponent<Transform> ().localScale = new Vector3 (-1, 1, 1);

@theunderstudy I have this same issue. Have you found anything out? Maybe comparing both our scenes will help narrow things down…

Hi, I ended up using something different to get the effect I wanted(Limited time for a school project) I passed an opaque object infront of the camera to give the effect of the players passing through the tunnel. All though it didn’t fix the problem, I hope you can use something similar.