Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visualize the AssetReference in the scene without instantiating through code

Discussion in 'Addressables' started by ajon542, Jan 17, 2019.

  1. ajon542

    ajon542

    Joined:
    Oct 22, 2013
    Posts:
    25
    A fair amount of the normal workflow in Unity is setting up scenes in the editor i.e. positioning and scaling of objects. I can attach an AssetReference through the Unity inspector, but I can't see the game object in the scene until I instantiate it through code. How can I setup a scene in the editor and still take advantage of AssetReferences?

    We're trying to utilize this for the purpose of lazy loading of assets, potentially with some placeholder assets in the scene.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    yeah, that's a known challenge of working with the system. You have two main options:
    1. break the big scene up into loadable smaller scenes. You can edit each of these sub-scenes as regular scenes, but you can load/unload them LoadSceneMode.Additive to address your desire to lazy load.
    2. Create a proxy-object system. We've prototyped this internally, but have been unable to make something that would actually be generally useful. We are in-progress on a public github sample project. It may not initially include a proxy example, but it will eventually as we know this is an important workflow.
     
    ajon542 likes this.