I don't understand

Maybe I’m stupid if don’t understand it, BUT at 7:19 he says, that I can manually disable controls from [SerializeField], what was he mean?
P.S Sorry for the grammar, English is not my native.

7:19… is that am or pm?

In all seriousness, it might help if you expand upon your question. It’s mostly other students here, so a little context might help get you an answer.

Hi Mobilkip,

I’m not sure what exactly you are referring to but in the PlayerController class, we have the following code:

 bool canMove = true;

// ...

        if (canMove)
        {
            RotatePlayer();
            RespondToBoost();
        }

The value of canMove determines whether the if-block gets executed. If the value is false, the player will not rotate or “respond to boost”.

To control the value of fields in the Inspector, we usually use the [SerializeField] attribute.

[SerializeField] bool canMove = true;

With this piece of code, you could toggle the value in the Inspector.

Is this what you wanted to know?


See also:

Thank you, I had a headache while watching, so doesn’t understand it correctly

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms