Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Editor: how to know when you're exitting prefab mode?

Discussion in 'Scripting' started by FeastSC2, Dec 7, 2020.

  1. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    I need to call function when the user is exitting the isolate in prefab mode in an editor script.

    Is there a callback or something I can use to know when the prefab is being exitted?
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @FeastSC2

    Haven't done anything like that, but I know there is PrefabStage's prefabStageClosing event.

    Have you tried that?
     
    FeastSC2 and Kurt-Dekker like this.