Indeed, within the editor, fields marked with the [Required] attribute (shown as red in inspector), guard the action from being executed, but still show an error log in the console like “A required field named ‘SomeName’ is not set.”, so that you know something is wrong.
In runtime though and to save performance this attribute is not checked, and thus why a null reference is thrown instead directly.
Thanks 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.