Search Issue Tracker
Won't Fix
Won't Fix in 5.5.X, 5.6.X
Votes
0
Found in
5.2.0f3
Issue ID
725870
Regression
No
RequireComponent attribute doesn't fire the creation of the component on the object that has the script before adding attribute
Steps to reproduce:
1. Create new Unity project
2. Add a script component to any game object
3. Add "[RequireComponent (typeof(Rigidbody))]" in the line above the class name in the script
4. Save the script
5. Switch back to editor
6. Let it recompile the script
7. Notice the Rigidbody component will not be added to the object that already had the script
Note: Adding this script to game object after the change, creates the needed components as expected.
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
- Crash on ParticleSystemTrailGeometryJob::RenderJobCommon when changing trail Mode change with a large particle count
- Mouse cursor does not revert to the default mouse cursor when pressing the "Add column" button in the Search window
- ArgumentException is thrown and textures become unreadable when AssetBundle.Unload(false) is called
- URP Tab Reset Menu Button Is Invisible in Light Mode
- Editor crashes on "(Unity) WriteObjectToVector" when entering into the Play Mode
Resolution Note (2019.2.X):
low priority for the moment.