Skip to main content
11 events
when toggle format what by license comment
Jan 15 at 2:19 audit Suggested edits
Jan 15 at 2:19
Dec 31, 2024 at 14:58 comment added flackoverstow Note that this may be a better fit for code review StackExchange, the rough rule of thumb being that SO is for broken code, CRSE is for working code (that needs some improvement)
Dec 28, 2024 at 17:37 comment added Gerry Schmitz The reason why games have "cinematics" is to distract the user during startup and to give the "impression" of at least "working". Find the "earliest" event in the "app" you can hook, and kick off your async loading there. As some point "Loading n of x ..." (and a dancing bear) in the status bar might be enough to pacify the user ... which is really what you're trying to do.
Dec 27, 2024 at 22:49 comment added Finn I put a stopwatch around each chunk so that I know how long it takes to load the individual chunks. TEX1 takes the longest. To explain what happens there. A StringTable is loaded there (how the textures are called) and then each individual image is encoded and then returned as Texture2D. That takes the longest. This is the code for loading the tex1 tag: pastebin.com/tm3HkeiJ
Dec 27, 2024 at 21:30 comment added Finn Thanks. Haha! That file I load is only 1.009KB...
Dec 27, 2024 at 19:07 comment added Jim Mischel Can you give us some idea of how much data you're loading? A few megabytes? A gigabyte?
Dec 27, 2024 at 16:57 comment added Jérôme Richard If the CPU is not much used, then it is probably the storage device which limits the operation? I advise you to profile IO/s to be sure. On SSDs, asynchronous operation can help not to be latency-bound. Alternatively, You can also move IO operations in multiple separate dedicated threads. This is a significant work but big games often does that so to avoid slowing down a lot the main thread (IO/s operations have a huge latency, especially on HDDs).
Dec 27, 2024 at 16:55 comment added derHugo Some of these things can further also be done asynchronous in Unity e.g. using the Mesh API
Dec 27, 2024 at 16:54 comment added derHugo You could at least use a background thread to process most of these things while maintaining the UI main thread interactive (e.g. showing a loading bar to the user) instead of having a complete freeze. Then when it comes to actually create the meshes and types that require to be created in the Unity main thread you could use my Stopwatch approach from here in order to spread the load over multiple frames allowing a certain frame rate for user feedback - takes longer overall of course but is better UX
Dec 27, 2024 at 16:52 history edited Jérôme Richard
edited tags
Dec 27, 2024 at 16:34 history asked Finn CC BY-SA 4.0