Cooking unreferenced assets
My project generates levels dynamically, so I need to spawn assets from code that are not referenced by any map. By default such assets are not cooked and cannot be found at runtime.
When I execute RunUAT.bat manually, I can use the option -CookDir="Somewhere" to cook all assets beneath a specific directory even when they are not referenced, the project then runs correctly. The editor actually has an option "Directories to Always Cook" under "Project Settings -> Game -> Packaging", but adding directories there seems to have no effect at all. Is the option not for this use case or am I using it wrong? And is there any other way to cook unreferenced assets that I am not aware of? I could probably add a map that references all assets and is not used in the game, but I would really like to avoid this.
For windows the manual build is not a big problem, but I would also like to test my project on Android and have not yet managed to manually build and deploy to an android device.
asked May 27 '14 at 09:32 PM in Packaging & Deployment
BStbck and b14de; yes, that is the correct thing to use if you need to always cook some content.
BStbck - How are you observing that it has no effect, and what directory are you adding to the list? I forget what format it needed in 4.2, but this interface has been improved for 4.3 and the UI will now ensure the path is correct for your project (it stores them relative to your Content directory now). You also have additional options in 4.3 to stage additional non-uasset files for use in your game.
b14de - The cooked assets will be placed in the pak file for your project. You won't see them added as individual files unless you also disable "Use Pak File".
answered Jun 25 '14 at 05:05 PM
Jamie Dale STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here