A button to close AR Scene/ AR Camera

Hi, so I’m a beginner on unity, trying to make AR for educational purpose. I have UI scene & AR scene… the UI scene works fine, and in AR scene I put back-button one by one in every image-marker to go back to the UI scene (I have 21 markers and I put back-button in it one by one). The button appears & works fine when a marker is detected, BUT when marker is not there nor detected there are no button appears. I already tried to add canvas + back button in AR scene (outside image marker), but still cant, the button does not appear, I cant go back to the UI scene nor close it when I accidentally open the AR Camera (I need to press home button or recent apps button on my phone)

Please can anyone help me?? I’ll be more glad if there’s video since I’m a visual learner, but any help would be appreciated. sorry for my bad English grammar, Thanks in advance

While not using Vuforia, you may be able to reference our ARFoundation samples to accomplish this as we implement a “Scene Selection” scene and each “Scene” contains a back button returning to the “Scene Selection” scene.

This script in particular.

Update:
It’s solved. The problem is because I put the canvas which contains the back button on the top hierarchy, whereas I should have put it on the bottom hierarchy. And if you face the same problem after changing the hierarchies, try close the unity, delete that file in unity hub list and then reopen that file in unity hub. I faced that problem before, and now it works fine