Search Unity

Question LoadyDungeons: Review to understand

Discussion in 'Unity Cloud Content Delivery' started by darashayda, Sep 23, 2021.

  1. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    442
    Finally got to reading the code in the Dungeon code.

    I kinda think aloud to make sure I am understanding the Addressable setup.

    Addressable Groups:
    They are entire scenes.

    Hats:
    Designer has a choice to designate some Hat Addressable and some not. <---- CORRECT?

    Or

    public void SetHat(string hatKey)
    {
    // We are using the InstantiateAsync function on the Addressables API, the non-Addressables way
    // looks something like the following line, however, this version is not Asynchronous
    // GameObject.Instantiate(prefabToInstantiate);
    m_HatLoadingHandle = Addressables.InstantiateAsync(hatKey, m_HatAnchor, false);

    m_HatLoadingHandle.Completed += OnHatInstantiated;
    }

    The code randomly selects a hat to be Addressable?<---- CORRECT?



    The Addressable code parses the entire Scene data and figure out which are Addressable and which are not. All the designer needs is to click the check button for Addressable. <---- CORRECT?

    In my single scene prototype any Addressable GameObject in the scene appears in the Addressable Default group. But instead I could have make the entire scene Addressable and avoid all that extra detail, since the Addressable parses the scene data and figure Addressables out for itself. <---- Correct?


    public static void LoadNextLevel()
    {
    // We are going to be using the Addressables API to manage our scene loading and unloading, the equivalent way on the UnityEngine.SceneManagement API is:
    // SceneManager.LoadSceneAsync("LoadingScene", LoadSceneMode.Single);

    // Scene loaded in Single mode, the previously loaded scenes will be disposed by the Addressables.
    Addressables.LoadSceneAsync("LoadingScene", UnityEngine.SceneManagement.LoadSceneMode.Single, true);
    }

    The above is terrific functionality in our case which we are trying to build 1 single THIN game binary and keep run-time loading Addressable Cloud Scenes and Assets and Characters to get a new micro-world.

    Our micro-worlds are tiny little single scene complete games, quite varied in nature but we do not want to ship 10s of game binaries, impossible in the stores, rather ship 1 THIN game and Cloud Address and load the micro-worlds as new scenes.

    So the above code for scene management allows for such gaming design. <---- Correct?
     
  2. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    442
    After my initial review and a bit of coding and play with the buckets, CCD is step into 21st century for Unity insofar as Cloud techs.

    Previous Asset Bundles+Streaming and so on lacked any coherent programming design/paradigm! And they were difficult to support.

    API functionality of CCD is well thought thru, yet the Unity documentation is horrid, minus the interactive Onboarding and other per project/bucket interactive documentation that pops up, they are terrific! In one evening I was able to do what I took me over 6 months with Streaming Asset Bundles, which still half way works.

    CCD, unless I discover some skeletons in the closet soon, is a perfect match for our THIN game Cloud Parametrized techs.

    CCD allows us to develop games fast and effectively variate and mass customize. The game players are tried of STATIC HUGE GAMES.

    Combined with our Cloud techs I think we have a huge winner.

    Again the capable and committed CCD Unity staff are worthy of all commendations.

    For the first time after 1 year I feel normal around Unity people in this forum, and can deliver our organization's objectives in rapid and effective manner.

    Ms. Christina Guo and Mr. Tim and Mr. Danny and Mr. Arturo (spelling?) and others are all delivering the techs and services Unity deserves and the customers deserve and step up to all challenges.

    Dara
     
  3. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    442
    After reviewing the code more, I decided to use Arturo's Addressable scene change design which is superior to the Scene Management scene change.

    Apparently it does garbage collection at scene and asset level which is of value to us.