Search Issue Tracker

Fixed in 4.5.X

Votes

0

Found in

4.3.0b5

Issue ID

569426

Regression

No

Can add script that requires component that is conflicting with object's existing components

Scripting

-

1. Create object.
2. Add Rigidbody2D to the object
3. Create script like this:
[RequireComponent(typeof(Rigidbody))]
public class A : MonoBehaviour {}
4. Add it to the object.

You'll get error
"Can't add component 'Rigidbody' to Sphere because it conflicts with the existing 'Rigidbody2D' derived component!"
But component A will be still added to the object
You can do the same from a script. You can see it using AddA.cs script

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.