How to use functions in Microsoft vs code

How do I use functions using Microsoft Visual Studio code in Unity when there are so many? I need to know all the function names like applydamage, climb, punch, kick, protector throw, talk, swim, etc

1 Answer

1

Most functions, like all the ones you listed above, are created by you when you create custom code for your game, and can be called anything you want. There are a few special ones like Update, Start, OnCollisionEnter, etc that are built in to unity. Similarly the Components of unity have functions you can use to interact with them, like Rigidbody.AddForce, etc, all of which you can find listed on the unity docs website.

.

But to reiterate, everything you mentioned above sounds like a custom function that doesn’t already exist, so you would create then yourself and can call them anything. I’d recommend following some basic C# lessons and some basic unity scripting tutorials to get an understanding of these basic concepts.