• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Radic

Recruit
May 19, 2015
2
1
I'm currently developing a mod that adds some UI Components to the already existing toolbar (TSBAR). For example, a UIButton.

The problem i encountered was that if i'd switch to the asset editor (intersections) a lot of Sprites did not show up (the component itself is working fine, just the bg sprite not). For example:
button.normalBgSprite = "StopEmptyingIcon"

That works fine in game mode, but not in asset editor mode. I would guess that the sprites aren't loaded in the Asset Editor as they aren't needed.

So my question is, how could i load those sprites?

If i understand correctly, its possible to create sprites with using Texture2D as UITextureAtlas.SpriteInfo and adding it to UIInteractiveComponent.atlas and then reference it's name for the button's sprite attribute. Using Texture2D.LoadRawTextureData or LoadImage to load the texture itself, which would be helpful if i'd wanted to load some custom images. But i want the in-game sprites.

If someone could point me in the right direction, i'd be very happy.