Version: 2018.2

InitializeOnLoadAttribute

class in UnityEditor

Switch to Manual

Description

Позволяет при загрузке Unity инициализировать скрипты редактора без участия пользователя.

Note that static constructors with this attribute are called when Unity starts and when Run is pressed. In this second case the Unity runtime is intialised and this is treated as a Load.
See the manual page about running editor code on launch for further details.