Is there anyway to determine if it playmode

In a editorsccript, let just says i’m doing somethnig in the sceneview but want to change whatever i’m doing if it in playmode or only do a editor script during playmode, would anyone know any useful bit of code that can help me accomplish this

Application.isPlaying or Application.isEditor