Search Issue Tracker
Fixed
Fixed in 2020.3.42f1, 2021.3.13f1, 2022.1.23f1, 2022.2.0b15, 2023.1.0a17
Votes
0
Found in
2020.3.39f1
2021.3.10f1
2022.1.16f1
2022.2.0b8
2023.1.0a10
Issue ID
UUM-13795
Regression
No
"_targetRenderer.size" returns wrong value when setting "_targetRenderer.sprite" to null
Reproduction steps:
1. Open the user's attached "CrazySpriteRendererBehaviour.zip" project
2. Open the "DemoScene" Scene
3. Go to "Testing Target" > "Testing Scenario (Script)"
4. Press the "Illustrate Issue" button
5. Observe the Console window
Expected result: "Preparing Sprite Renderer.", "Remember the Size property value: (10.00, 10.00)", "Setting sprite." "Check out Size property now: (10.00, 10.00)", "P.S. it happens only when Sprite property is null." messages are Logged
Actual result: "Preparing Sprite Renderer.", "Remember the Size property value: (10.00, 10.00)", "Setting sprite." "Check out Size property now: (0.60, 0.60)", "P.S. it happens only when Sprite property is null." messages are Logged
Reproducible with: 2020.3.39f1, 2021.3.10f1, 2022.1.16f1, 2022.2.0b8, 2023.1.0a10
Tested and reproduced with: Windows 10
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
- Editor crashes when debugging a for loop
- Crash on UnityPlayer!profiling::ProfilerManager::DisposeProfilerRecorder+0xa when Player gets relaunched and exited after running for a long amount of time
- [Input system] When releasing one touch and pressing a second touch during a single frame, the second touch is not translated into UI event line OnPointerDown by the InputSystemUIInputModule
- URP Samples - multiple "Attempting to resolve render surface" and other errors appear when setting Quality pipeline asset
- OnDemandRendering.willCurrentFrameRender returns incorrect values in the Player when UnityEngine.Rendering.OnDemandRendering.renderFrameInterval is greater than 1
Resolution Note (fix version 2023.1.0a17):
The behaviour is intended so that the size value is meaningful when a new Sprite is assigned to SpriteRenderer when previously it is null.
Updated API docs to clarify this behaviour.
Resolution Note (fix version 2022.2.0b15):
The behaviour is intended so that the size value is meaningful when a new Sprite is assigned to SpriteRenderer when previously it is null.
Updated API docs to clarify this behaviour.
Resolution Note (fix version 2022.1.23f1):
The behaviour is intended so that the size value is meaningful when a new Sprite is assigned to SpriteRenderer when previously it is null.
Updated API docs to clarify this behaviour.
Resolution Note (fix version 2021.3.13f1):
The behaviour is intended so that the size value is meaningful when a new Sprite is assigned to SpriteRenderer when previously it is null.
Updated API docs to clarify this behaviour.
Resolution Note (fix version 2020.3.42f1):
The behaviour is intended so that the size value is meaningful when a new Sprite is assigned to SpriteRenderer when previously it is null.
Updated API docs to clarify this behaviour.