using UnityEngine;class Example : MonoBehaviour { void Start() { if (Application.isPlaying) { print("In player or playmode"); } } }