Hi all, I hope this is the right forum.
A client is interested in creating a server-side database with graphical assets for a game that can be updated arbitrarily. The expectation would be that they could update the game graphics and contents merely by altering the contents of the database themselves, with no need for a programmer or a direct patch to the game.
To the best of my knowledge and research, this does not appear to be possible in Unity. And I really don’t know if it’s possible at all, with any compiled executable. Unity graphical assets must be prepared for use by the engine, correct? I can’t just reach out to some server and pull a JPG because it’s not in any form the Unity can recognize for immediate use. And even if I could, I would need to scan through existing files that would have to be indexed properly and literally code in a server-side scan that updated assets from inside the game. Again, I assume this is impossible.
Are my clients asking for something that is not possible in any circumstance? Or just in Unity? Thank you for your help!
Chris
Videos and images (jpg or png ) and text can be downloaded from the web via the www class and be used in game.
Its not the best method to deliver content to unity but in some cases its the only way.
The better way is to use asset bundles, they are a package that can be build from unity that contain the content that you like to load in the target application. Yes is need to go through unity but you can automate it to let it run automatically on the server.
AssetBundles can include in addition Models sounds and any other asset beside code.
Having experience with a similar situation, we use a background .net process to sync content and then load from disk in unity. The down side to this is that loading textures outside of asset bundles with a variety of dimensions can take long. Lazy load is not an option because it piggybacks on the main thread affecting everything else makin it unresponsive till loading is over. So you need a Loading scene to only load assets rendering only a Loading message and then additive load your main scene. Well, this is more like a decision for our case alone. So this is not exactly a solution I can recommend.
Ultimately,seeing as how Unity favours AssetBundles,it’s the best way to go. It IS Unity’s answer to how you can update your game content.
Unfortunately our team is small and when our project started no one considered ABs due to restrictions so it’s not easy for us to refactor the existing codebase.
If you have the resources, my recommendation is to use ABs.
Watch this talk from Unite 2015.