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
- [Android] 30-45% of allocated memory is "Unknown" in an empty project on some Pixel devices
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
Add comment