How to change Sprite on Billboard in Construction Script

I’d like to change the in Editor viewed Sprite on an Actor that is a spawner, based on what type of NPC the spawner is going to spawn.

I added a Billboard component, then set sprite on it, feeding it a sprite selected from comparing the set class variable of what to spawn, but it doesn’t do anything.

Set Sprite( Billboard ). I was trying to use another node called set sprite which took a Texture2D. It works.

This functionallity has been taken out, it is no longer possible to use custom editor sprites :frowning:

You actually can do this pretty easily, you just need to replace the Default Scene Root with your own Scene Component and then add a Billboard Component to the new Scene Component.

Then in the construction script you can call SetSprite off the the Billboard Component.

One things to note: it’s a little tricky to replace the default scene root with your own. To do this you must first add a new Scene Component and the drag the new scene component over top of the default one to replace it.

279131-actorchangebillboard.png

2 Likes

Worked a charm. Thank you!