Search Unity

SceneManager's events, and events in general

Discussion in 'Documentation' started by Baste, Sep 7, 2016.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    SceneManager defines three static events:

    Code (csharp):
    1. public static event UnityAction<Scene, Scene> activeSceneChanged;
    2. public static event UnityAction<Scene, LoadSceneMode> sceneLoaded;
    3. public static event UnityAction<Scene> sceneUnloaded;
    None of the events have documented what their arguments are. It's not too hard to guess what the arguments are, but at least some people get confused.

    All publicly available events should document not only when they're raised, but also what data they send. This is just one example, I don't think I've ever seen an event document it's return data. I might be wrong.
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I'll add this to the list of needed improvements to the docs. Hope it doesn't take too long for this to added, and similar docs found and improved.
     
    Zullar likes this.
  3. DistulX2

    DistulX2

    Joined:
    Dec 19, 2016
    Posts:
    3
    Bump. Documents still do not reflect this information.
     
  4. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Bumpdee bump

    Documents still do not reflect this information.
     
  5. Samacvuk

    Samacvuk

    Joined:
    Jan 8, 2017
    Posts:
    30
    Bumping
    Doc still does not contain this so much needed info on usage.
     
  6. thehippomaster21

    thehippomaster21

    Joined:
    Sep 9, 2017
    Posts:
    1
    Bump! Document still doesn't reflect this.
     
  7. JetStreamSham

    JetStreamSham

    Joined:
    Jul 4, 2015
    Posts:
    27
    Bump.
    Docs still don't have this info.
     
  8. paulsm_unity

    paulsm_unity

    Unity Technologies

    Joined:
    Sep 9, 2017
    Posts:
    3
    It is on our Radar guys.
     
  9. callen

    callen

    Joined:
    Dec 31, 2013
    Posts:
    33
    Good to know, as I was just trying to find this exact info!
     
  10. mekartikshah

    mekartikshah

    Joined:
    Jan 10, 2017
    Posts:
    89
    Guys, when you are updating docs?
     
  11. jc-drile77

    jc-drile77

    Joined:
    Jul 1, 2014
    Posts:
    230
    mekartikshah likes this.