#not enough information on the actual

1 messages · Page 1 of 1 (latest)

pulsar pulsar
#

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);
crisp bobcat
#

I thought you meant old school UI

pulsar pulsar
#

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?

crisp bobcat
#

its up to you , whichever looks more comfortable to use

#

UItoolkit is good and its new, its just more to learn at first

#

old gui works fine and its probably something you should learn just to have that knowledge

pulsar pulsar
#

understandable.

#

thansk anyways

#

do you have any idea on this issue in anyway