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

Question Addressable to latest c# files

Discussion in 'Addressables' started by lorddanger, Jun 24, 2020.

  1. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Hello ,
    So I am new to assets Bundles and Addressable in my case I want to update UI Prefab,
    But not the Update to the layout or anything but a script that is updated

    Example
    Prefab has a script called "UIManager" attached to it
    Now the prefab is the same only thing I have updated is the UIManage.cs.
    So now I rebuild it will the new package contain the Updated script I can't seem to make
    any script Addressable like we can do with Prefabs etc.
    Also,
    How we update non-MonoBehaviour scripts?
     
  2. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
    You can't make compiled code into an assetbundle. A lot of platforms don't even allow dynamic code generation/loading. If you want to update code, you have to make a new engine build.
     
  3. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Thanks for the response!
    I see but in some of the videos about Addressable says it can be used to deliver DLC
    and as far as I can say most DLC contents will have new or Updated Scripts...
    So there is there a solution?
     
  4. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
    DLC = downloadable content. Assets are content. Code can fall in that category, but it depends on the platform, and Unity doesn't support it well, even on platforms that do support it.

    Instead, you should write your code in a data-oriented pattern so you don't need to update the actual code, just update the values that the code consumes.