Search Issue Tracker
Won't Fix
Votes
0
Found in
4.1.2f1
Issue ID
539169
Regression
No
Custom Editor that uses SerializedProperties works as expected until duplicating an object
Steps to reproduce :
- open the SpriteDemo scene.
- select one of the sprites.
- play with the "Texture" property so you can see the script work normally.
- duplicate (Cmd+D) the object.
- changing the "Texture" property on one of the objects will do nothing, on the other object will change both objects.
Explanation :
After some investigation, we found that it actually is caused by the mesh referred in MeshFilter is shared between duplicated objects.
When you change texture setting on the sprite, you change the underlying mesh's uv coordinates in TwoDeeSprite.UpdateMesh() function. And since you are not always creating a new mesh when a TooDeeSprite is instantiated (see TwoDeeSprite.Awake; mesh is retained if there is one), that leads to the phenomenon you've observed.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment