Hi,
I’m coding some UI that uses SpawnIcons, but whenever I run it for the first time the icons have to be rendered. Here’s an example of what I’m talking about:
(Note: My particular problem does not pertain to the SpawnMenu).
So I was wondering if there was any way I could just pre-cache these icons in the very beginning. I’ve looked at util.PrecacheModel and Panel:SpawnIconRebuild() but I’m not sure if they’re what I’m after. Any help or explanation on the subject would be much appreciated.
Thank you.
Fixed
Ended up doing what TankNut said, just pre-drew all the icons as DSpawnIcon in the top left corner of the screen before I’d actually be using them. I used Panel:SetAlpha( 0 ) so that you don’t notice them being rendered.