Skip to content

[Standalone] [RequireComponent(typeof(T))] does literally nothing #231

@PaperPrototype

Description

@PaperPrototype

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions