Home > Back-end >  Make two canvases show the same thing
Make two canvases show the same thing

Time:11-28

Lately, I'm trying to make two canvases show the same thing, one being world space, the other being a screen space - Overlay. I want to do this because when I'm in a menu screen space one is displayed and then you exit it and it is updated on the world space one. I hope you know what I'm trying to ask :)

Cheers!

CodePudding user response:

Instead of making two canvases, one being world space and the other being overlay, I made a script that when it is clicked it changes the canvas to overlay.

Script:

void EnterBoard() {
    canvas.renderMode = RenderMode.ScreenSpaceOverlay;
}
void ExitBoard() {
    canvase.renderMode = RenderMode.WorldSpace;
}

This makes the canvas overlay and then changes to world space when exiting it.

  • Related