Search Issue Tracker

Fixed in 2017.1

Votes

1

Found in

4.3.0b5

Issue ID

569427

Regression

No

No errors if RequireComponent attribute applied to component after it was added to an object

Scripting

-

Steps:
1. Create an object.
2. Create custom component A
3. Add A to the object
4. Edit component A that it now requires e.g. Rigidbody

[RequireComponent(typeof(Rigidbody))]
public class A : MonoBehaviour {}

5. Play scene

There will be no errors.
Should throw exception or give warning in console.

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.