В UI есть скрипты Image, Text и так далее, они выполняются даже когда не нажата кнопка Play. Как это сделать для своего скрипта?
Makes all instances of a script execute in Edit Mode.
By default, MonoBehaviours are only executed in Play Mode. By adding this attribute, any instance of the MonoBehaviour will have its callback functions executed while the Editor is in Edit Mode too.
...
The functions are not called constantly like they are in Play Mode.
Пример кода:
[ExecuteInEditMode]
public class PrintAwake : MonoBehaviour
{
void Awake()
{
Debug.Log("Editor causes this Awake");
}
void Update()
{
Debug.Log("Editor causes this Update");
}
}
Как вести несколько рекламных аккаунтов в антидетект-браузере
Подготовка и масштабирование рекламных кампаний в среде Linken Sphere