My Update/Awake/OnEnable/etc functions are running when not in play mode on Selectable.

As the title states, I have a prefab for my UI with a script that extends Selectable (which in turn extends MonoBehaviour if you go down the chain). When I enable/disable the script from the hierarchy, the corresponding functions are called. Update is getting called repeatedly too. This is filling my console with errors because these scripts are written to be ran while playing the game, not all the time.

This seems like incorrect behavior to me, but I may just be daft. Am I missing anything? I don’t see anything in the documentation that suggests this is what it does.

I’m currently on 2018.3 beta, but I have tested this in 2018.2 and the behavior is the same.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TestScript : Selectable {
	void Update () {
		if (Application.isPlaying) {
			Debug.Log ("Playing");
			GetComponent<Image> ().color = new Color (1f, 1f, 1f, .2f);
		} else {
			Debug.Log ("Editing");
			GetComponent<Image> ().color = new Color (1f, 0f, 0f, .2f);
		}
	}
}

Hierarchy

You’re correct, and I am experiencing the same “issue” 2 years later. Weird.