RequireComponent for a C# script from within JS

Hi all,

I have a C# script (ReadData.cs) that uses a plugin.

I have a JS script (Controller.js) that reads variables acquired by the ReadData script.

When I try

@script RequireComponent ( ReadData )

in the Controller script I get an error: Unknown identifier: ‘ReadData’.

The other RequireComponent calls to JS scripts within Controller.js work fine.

Would someone tell me the correct way to do this?

TIA

the way is correct. but you must ensure that readdata.cs is in a folder that gets compiled first, otherwise the whole class is non existant at compiletime of the JS code

Thanks dreamora, brilliant as always.
I moved the ReadData.cs to the Plugins folder - all sweet.