101k views
4 votes
What are the two types of variables we have defined in Unity?

a) Integers and decimals.
b) Local and global.
c) Public and private.
d) Static and dynamic.

User Sevenkul
by
8.3k points

1 Answer

6 votes

Final answer:

The two types of variables defined in Unity are public and private variables, which have different levels of accessibility and usage.

Step-by-step explanation:

The two types of variables defined in Unity are public and private variables.

Public variables are accessible to other scripts and can be seen and modified in the Unity editor. They are often used for communication between different scripts.

Private variables, on the other hand, are only accessible within the script they are declared in. They are typically used for variables that do not need to be accessed or modified by other scripts.

User Diepie
by
8.5k points

No related questions found