Search Unity

reproduce "Open Prefab" by script

Discussion in 'Scripting' started by FeastSC2, Sep 17, 2020.

  1. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    I would like to reproduce the click of this "Open Prefab" button with a C# script.

    Any idea how I can achieve that?

    upload_2020-9-17_12-1-37.png
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Basing my answer off this thread:

    It seems like you can use
    AssetDatabase.OpenAsset
    .
     
    FeastSC2 likes this.