Simple Question

Hi it’s me again, with another question :slight_smile:

i was wondering what these brackets after function Update or over functions are:

function Update(//what can you do with these?!)

Ar asking about the angle"()" brackets followed after Update ?

That is just a protocol to define any method. It has been in existent since C and we have been following it in the subsequent programming languages. And Update is also a method which Unity call in for every Time.deltaTime.

If there is anything specific you want to know, let me know.

To throw a generic document about methods, here it is

Those are parenthesis, not brackets.

{ } ← These are brackets.

Parenthesis are used define methods, and invoke method calls. They are used to differentiate methods from other types of code. Example:

int foo = 5;  // A variable named foo
void foo(){   // A method named foo
    return "hello";
}
print foo   // This prints 5
print foo() // This prints hello

As you can see in the example, brackets are used to define the body of the method. You can also insert arguements into the parenthesis of a methed, like this:

// This takes a number as an argument and adds 1 to it
void foo(aNumber){
    aNumber += 1;
}

I highly suggest you familiarize yourself with basic programming techniques before doing anything in Unity. Otherwise you’ll keep coming back here and flooding UnityAnswers with incredibly basic questions like this. Sorry but I have to downvote the question, it doesn’t belong here. Google “basic programming” and do some tutorials.