In Javascript you can have 50 plugins extending the same function through aliasing. This allows you to have 50 plugins that can be compatible with each other as long as they aren't interfering with each other. In C# method overriding is impossible.
Not quite. In C#, there's a thing called "virtual" and "abstract" functions. If you wanted to override a method, you would inherit from the same class and literally use the override keyword.
public class Animal
{
public virtual void MakeASound()
{
throw new System.Exception("You didn't override me!");
}
}
public class Dog : Animal
{
public override void MakeASound()
{
Debug.Log("Bark bark!");
}
}
public class GreatDane : Dog
{
public override void MakeASound()
{
base.MakeASound();
Debug.Log("WOOF WOOF!");
}
}
Calling Animal.MakeASound() will throw an error, but it's made to be overridden.
Dog.MakeASound() will print "Bark bark" in the console. It's completely overridden the Animal.MakeASound().
GreatDane.MakeASound() will print both "Bark bark" AND "WOOF WOOF!". Calling base.MakeASound() will call the logic from Dog.MakeASound (the base class it inherits from).
You can recycle the same logic from a base class and extend it.
Tbh, I find this cleaner than JS plugins littering object definitions in 50 different places.
Plugin development in Unity asset store works in such a way that the plugins are maintained by the owner. If someone wants an extension, it's solely at the author's discretion. In rpg maker community you don't have just standalone plugins. You have plugins expanding upon existing plugins. And at times you even have other people making compatibility patches or fixes of existing plugins.
There are tons of Asset Store plugins that integrate with each other.
Typically, C# code is pretty neatly packed up in namespaces. I suppose it's the equivalent of:
import Code from 'package';
This makes it rather easy to access other plugin's code and work with compatibility.
___________________
I'm getting off topic, but I use Javascript a ton at work and I definitely prefer using C#.
If you're interested in picking up the syntax and such (if you don't already know), check out the latest edition C# Player's Guide.