- Home /
Question by
Tbage · Apr 24, 2017 at 11:55 PM ·
uiui imageenumgetkeydownchange material
Help needed changing background in text adventure
ok so, we have a Private Enum which contains all of our "zones" (cave_start, cave_corridor_1, etc)
we then have our void statements for example
void cave_hall_1() { text.text = "default text";
if (Input.GetKeyDown (KeyCode.N)) { myZone = Zones.Cave_Hall_2; } }
what we want is for the background (UI, Canvas) to change depending on which button was pressed. if there was an option to go to cave1 and cave2, and you chose cave1 the background for cave1 would replace the previous one. but this all has to happen in the same scene. how can we do this?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612120424im_/https://answers.unity.com/themes/thub/images/avi.jpg)