#not enough information on the actual
1 messages · Page 1 of 1 (latest)
So i am trying to make a information tab to display player info. im using uitoolkit for the system and made a uidocument which contains the visual elements to display images.
originally i have made a weapon system and for players to pick up weapons. I would like to have the weapon icon to be displayed on the corresponding visual element in the uidocument.
however, i have tried a very long time and still cant get the icon to display. so im testing if the changes are applied or not and other ways to debug.
But ultimately,
the weapon is a scriptable object and has a Sprite attach to it as a icon.
im trying to get the viusal element and have the icon display.
weaponContent = uiDocument.rootVisualElement.Q<VisualElement>("WeaponContent");
weaponIcon = weaponContent.Q<VisualElement>("WeaponIcon");
//in update function
weaponIcon.style.backgroundImage = new StyleBackground(gunList.ActiveGun.WeaponIcon);
sorry, im pretty new to game dev.
im still trying to figure out the best approach and stuff
is uitoolkit good for development? since many tutorials still use old UI style
do you recommand re-doing it in old school ways?