Search Issue Tracker
By Design
Votes
0
Found in
2017.4.9f1
2019.1.0a1
2019.1.6f1
2019.2.0a1
2019.3.0a1
Issue ID
1164993
Regression
Yes
GameObject turns black when a Texture of an instantiated Sprite is used in the Material
How to reproduce:
1. Download and open the attached project "1164993.zip"
2. Select the Cube GameObject in the Hierarchy and inspect its Material
3. Start Play mode
4. Inspect the Cube GameObject's Material again
Expected result: Cube GameObject's Material remains unchanged
Actual result: Cube GameObject's Material turns black
Reproducible with: 2017.4.29f1, 2018.4.3f1, 2019.1.9f1, 2019.2.0b8, 2019.3.0a8
Notes:
Some Shaders will turn invisible instead of black (ex. Unlit/Transparent).
Sometimes the issue will not reproduce when changing Unity versions, reopening the project in the same Unity version twice will reproduce it.
To reproduce the issue in Unity versions earlier than 2018.3.14f1, the project will need to be reopened every time.
In Unity versions 2018.3.14f1 and above, the issue will reproduce every time the Play mode is started.
The affected Sprite's Texture needs to be added to a Sprite Atlas in order to reproduce the issue.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
Resolution Note:
By design, Atlas textures are almost always bigger than the size of the sprites they pack. Hence the texture of a sprite will not match with texture of the packed atlas. Sprite-Renderers and Canvas-Renderers dynamically update their UVs when the Atlas is used.
For custom use-cases such as above, please do not use Sprite-Atlas. This is by design.