Describe the bug
I have a FreeLook component that has a RequireComponent(typeof(Camera)) attribute
[RequireComponent(typeof(Camera))]
public class FreeLook : MonoBehaviour {
// stuff that depends on camera
}
When I add the FreeLook component I was expecting it to throw an error or something if there is no camera component on the same gameobject
To Reproduce
literally try using RequireComponent
Expected behavior
Throwing an error
Additional context
Maybe instead of throwing an error remove the RequireComponent attribute entirely?
Describe the bug
I have a
FreeLookcomponent that has aRequireComponent(typeof(Camera))attributeWhen I add the
FreeLookcomponent I was expecting it to throw an error or something if there is no camera component on the same gameobjectTo Reproduce
literally try using
RequireComponentExpected behavior
Throwing an error
Additional context
Maybe instead of throwing an error remove the
RequireComponentattribute entirely?