Hello!
Im trying to make almost the same SettingsScreen in my project. Using the Dragon Crashers UI Toolkit example. I was able to do almost everything but the slider.
The slider background img is broken.
I found where it was defined. It was in SettingsScreen.uss
It didnt work for the specific case of the slider. Because I can’t edit the VisualElements under the slider called “settings__slider1”. Look:
So, I think I should edit the USS file directly. And I could do it if I had the sliders images separated as .png files. But I have it in an Atlas called “UI_atlas.psd” . My question is, how I can access it inside an UI atlas in .psd?
And I know there is a way to do that because in the example they used this URL command: url(‘project://database/Assets/UI/Textures/UI_atlas.psd?fileID=-3395496807846359274&guid=68de98d899585b7469e0fb40a0fcbc56&type=3#bt_05’);
First make sure that the class is correct by checking it on a standard Visual element, second you need to find the right selector to assign. It should be fine with the debugger but if you can’t find it then the older versions of Unity have UI Toolkit as a separate package so if you get this you can check the theme code to help you find the selector.
Thank you @dlorre , for your help. But I have found the solution.
The problem was in the file ID and guid in the img file, and my url.
So I have created a new Visual Element in my builder and asign the bt_05 as background img. And I copied the url() from the uxml file and pasted it in my USS.