Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Documentation problem on OnOpenAssetAttribute in Unity 2022.3

Discussion in 'Documentation' started by Beshi38, Oct 8, 2023.

  1. Beshi38

    Beshi38

    Joined:
    Feb 7, 2021
    Posts:
    5
    Hello,

    I am a user of Unity 2022.3 and I have encountered a problem with the OnOpenAssetAttribute class. I couldn’t find any information on this class in the Unity 2022.3 scripting API documentation, while it exists in the 2020 version. Can you tell me if this class has been removed or changed in the new version, or if the documentation is not up to date? Thank you in advance for your reply and your help.
     
  2. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,195
    But that's not OnOpenAssetAttribute, that's the enum you pass to that attribute.

    The callback is indeed missing. in 2020 it's listed under UnityEditor.Callbacks:
    upload_2023-10-9_13-18-57.png


    In 2022, it's missing completely:
    upload_2023-10-9_13-21-15.png

    Which is a problem, since you need to know that the method you're adding the attribute needs to have a specific signature, and that signature is missing.
     
  4. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    Oops, my bad, sorry.
     
    Last edited: Oct 9, 2023