unity script detect if in prefab edition mode code example
Example: unity script detect if in prefab edition mode
using UnityEditor;
using UnityEditor.Experimental.SceneManagement;
if (PrefabStageUtility.GetCurrentPrefabStage() == null) {}
// If null it mean you are not in prefab editing mode