How to "include" an inherited C# Class into the file?

What are the mechanics to “include” an inherited C# Class into the file? Like C++ that uses the pragma #include.

Does it have to be attached to the same GameObject?

Should the inherited Class be included (cut and paste) into the same file even though many other files may incorporate the same inherited class?

Could the Class simply lie in the scripts folder and Unity will include the file into the other automatically?

Thanks CSDG.

The last one. If that doesn’t work, make a Plugins folder and put it in there. If it’s a namespace you may want to use a ‘using’ statement, but you shouldn’t need to.

Thanks Peter G

Unity will automatically include all scripts in your build. It does not try and determine which ones are used and which are not like it does with other assets so as long as it is in your project folder, you can expect it in your final build.

This bit of information is important. One day I uploaded many script examples into a Unity project in order to experiment. Unity was bleeding through other apps and doing weird stuff.

I will remember to clean my scripts folder once i have finished with the project. Is there any diagnostics or statistical software to determine how the project is functioning?

Thanks again CSDG

OK - Thanks Dave

Adding files is like MAGIC - Unity includes (attaches) references to other files that are not attached to GameObjects. WOW!

Thanks again. CSDG