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