Delight icon indicating copy to clipboard operation
Delight copied to clipboard

Unity Addressables integration

Open DerBernie opened this issue 5 years ago • 7 comments

Hi,

I'm currently trying to understand whether we can use Delight together with Unity Addressables. I guess we can't add completely new views (as it requires the code generation in Unity Editor to run), but could it work for styles? Is there a way to dynamically load a style definition (from remote) and apply it to (all) views?

Thx for any hints! BR

DerBernie avatar May 18 '20 12:05 DerBernie

I don't have an answer if there is an easy solution. Styles are applied during compile-time as well. I'd have to look into how addressables work. Can you tell me more of what you want to achieve?

patrik-u avatar May 18 '20 12:05 patrik-u

thx for the fast response, Patrik!

We'd like to change the UI style during runtime (we upload a new style to some hosted place, game picks up the new style during startup). For our prototype, we're already using Unity Addressables to load textures, text content or whole prefabs dynamically. As styling classic Unity UIs by hand in the prefabs isn't that comfortable, the XML based views/styles of Delight seemed promising.

DerBernie avatar May 18 '20 12:05 DerBernie

I can certainly see how that would be a useful feature. Currently the framework doesn't support run-time switching of styles, it might not be the most difficult thing to implement, depending on your requirements - it will take some work though.

patrik-u avatar May 18 '20 14:05 patrik-u

Yeah, I guess there will be others as well who'd like to use this. Thanks for the clarification, I'll check the codebase to see if I can contribute.

DerBernie avatar May 18 '20 19:05 DerBernie

It's bit too big of a task for me to undertake pro bono, but if you're interested in commissioning work you can send me an email at [email protected], otherwise I'm happy to answer any questions you have regarding the framework.

patrik-u avatar May 18 '20 20:05 patrik-u

Addressables is an important requirement for us, aside from styling at runtime though. In our title we use addressables to ship mini-games that often have their own UI. Would this be possible? Or is compile-time a hard requirement? If compiling the XML into Unity UI is the issue, is it possible to precompile these assets (so we can make them addressable)?

Also, as an aside, the new addressables system is incredibly good and worth looking at. It's well-suited to larger more complex products (likely the same audience that wants a system like Delight to manage UI complexity).

Thanks in advance!

chadobado avatar May 26 '20 16:05 chadobado

Thanks for your input. I'm going to have to take a closer look at the addressables system and see what I can do with it. Currently you can have your UI reference assets that are inside asset bundles, and you can always swap those assets out during run-time. So in that sense run-time styling is possible, I'm not sure if that offers you enough flexibility though.

patrik-u avatar May 26 '20 17:05 patrik-u