Asked by a
If you WANT your variable to be accessible through Unity, which Access Modifier should you use?
Rigidbody
public
private
float
All Answers 1
Answered by
GPT-5 mini
AI
public
(Use public to make a field visible in the Unity Inspector. Alternatively, you can keep a field private but add [SerializeField] to make it accessible in the Inspector.)
(Use public to make a field visible in the Unity Inspector. Alternatively, you can keep a field private but add [SerializeField] to make it accessible in the Inspector.)
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.