I have tried all the tips so far to optimize my UI. But it still lags when i open the settings for the first time. after it loaded once it doesn’t lag when i open it, only when i open the subcategories. They always lag a bit. I have already turned off raycaster for all the things that don’t need it, I have split the UI, I have made the subcategories canvases, I have turned off pixel perfect and I have changed from Screenspace camera to Screen space overlay. And it still lags. do you guys have any ideas?
Sounds like you need to preload your assets ahead of their being used. I have not yet done this myself, but know it is available.
Check Unity - Scripting API: PlayerSettings.GetPreloadedAssets
You will find a lot more by doing a search for unity preload assets in Google that may help explain how best to do this.
