Search Unity

Scene Metadata

Discussion in '5.3 Beta' started by any_user, Oct 10, 2015.

  1. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    339
    Is there a way with the new SceneManager to set some game specific scene metadata that could be read without loading the scene? I was thinking about something like adding a MonoBehaviour script to the scene that can be found like that (or similar):

    Code (CSharp):
    1.  
    2.         SceneManager.GetSceneAt (0).GetComponent<MySceneMetadata> ();
    Are there any easy ways to do something like this?
     
  2. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    I'd love something like that too. Though I think Scriptable Objects are a better fit for the job.