Question about Interfaces in C#

I’ve been studying more into C# to better my overall code within Unity. It took me a while but I believe I might finally understand them. From my understanding the interface is used to make sure you have all the functions needed in the original inherited class.

In otherwords a interface tells you something like this.

Interface School
You need pencils
You need paper
You need books

and without any of those will throw an error. So I guess you can call it a guide? Out of everything in C# this has been the most confusing for me. Am I understanding it correctly? If not, how would it benefit coding in Unity?

for the longest time I was thinking interfaces were used to transfer values from one function to another instance of the function.

Yes, interface is basically a set of function definitions, that a class implementing this interface will have to implement.

For some this is a way around the fact that there is no multiple inheritance in C# - you can only inherit one class, but you can implement multiple interfaces. So you can organise sets of functions into groups that make sense and then just pull them into classes.

You can also make variables that take an interface as their type, which means you will be only be able to assign objects of class implementing that interface (just like you would if inheritance was used).

I case of Unity you would mostly have classes that already inherit from MonoBehaviour or ScriptableObject, so you can’t inherit anything else, but can add interfaces.
(Of course in some cases it may make more sense to just build more inheritance layers)

If you want to expand your understanding of C# I recommend C# in Depth Book by Jon Skeet. He does a good job of explaining the language and how to use its features to your benefit.