Summing objects

Hello, I’ve been doing some research on something I cannot seem to find a straight answer to. It’s something that Unity implements in the Vector3 or the Color class. Namely is the summing operations that you can perform between objects of these classes. For example if I have a Vector3 object A (1, 2, 3) and another B (7, 8, 9) I can sum (A+B) and get a result of (8, 10, 12). After a long search I landed on the Aggregate method from.NET but I cannot understand completely it’s usage and even whether or not this is the thing I’m looking for. Can somebody please explain how this thing works in both JS in C# or at least one of those. It is not something vital to my work but I’d really like to educate myself :slight_smile:

Cheers!

It’s Operator Overloading.

Great! Thank you for that! I understand that it is only usable in C# and not in UnityScript - that’s okay, good to know that.