how to find reference to basic stuff like for loops in API?

I am trying to use API lookup from visual studio 2017 to learn about basic things like for loop and void. But the API just returns endless loading screen. I also tried searching in web browser, but it returns nothing.

If I search something like vector 3, instant results lie you would expect. Where can I go to see what the basic parameters of for are? is this a bug?

thanks

MSDN is usually a good place for things like this.

void

for

2 Likes

thanks. but it doesn’t exist in unity API? because sometimes these things are different based on what paradigm they exist in?

These are general C# things. Unity’s API only covers Unity’s API, not basic programming things.

For those, any general purpose C# tutorial will cover them.

2 Likes

gotcha thanks

As Baste pointed out above, no, it’s not part of Unity, it’s just C# syntax

As you go forward and dig into C#, it may be helpful in organizing your mind when you learn new things to put them in one of the following three primary buckets:

  • the C# language syntax itself (things for, if, foreach, class, int, float, brackets, parentheses, etc.)

  • the C# .NET API (things like List, Dictionary, and other higher-level functions/classes)

  • the Unity API (everything under UnityEngine and UnityEditor and those namespaces)

The first two items are largely covered by the MSDN link Baste provided above, whereas the third item is covered by the Unity Scripting Reference.

This sort of brain-bucketing will also help you maintain a higher-level of awareness of the different parts of the system outside of your actual scripts, and especially how to troubleshoot them or look up more information on them.

And of course, if you introduce a new third-party library, that’s gonna be another bucket.

1 Like