Should you use IF UNITY_EDITOR before OnValidate?

Опубликовано: 22 Октябрь 2024
на канале: blazeDev
2,020
4

Since I started using OnValidate in Unity I always met two types of programmers. First, telling that you need to write #IF UNITY_EDITOR instruction before it, and second telling you needn’t. I don’t like guessing so I decided to check it.

=====

You could find me on Twitter where I upload links to my videos and share other interesting gamedev stuff.
  / blazedev_yt  

Feel free to ask me for something in the comments section. You can also write me some suggestions for this or future videos. Bye!

=====

#unity #unitytips #unitytutorial #unitytutorials