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
- Palette Settings link to the documentation isn’t working
- Tags & Layers window has inconsistent remove button behaviour between Tags, Sorting Layers, and Rendering Layers when there are no removable items in the list
- "Type Options" and "Node Library" dropdowns do not open when clicked on the title
- Public char variables uneditable in Inspector when project setting "Use IMGUI Default Inspector" is enabled
- IAP Listener component’s list titles go out of bounds when resizing the Inspector window horizontally
Add comment