The cocos secondary camera does not display the problem
For example, the ui effect we normally want
But it became like this
It is because your two attributes are not adjusted properly
That is, the Priority and Visibility of the Camera
Priority means priority, to see which camera is displayed first
If the value of the main camera is larger than that of the auxiliary camera, the content of the main camera may block the auxiliary camera
For ClearFlags
ClearFlags means how to display other parts in addition to the normal display
If it is SolidColor, it is a solid color, which will block the content of the main camera
So we're going to modify
For 2d, as long as you don't declare solidColor, there is generally no problem
In fact, each is literally
dontClear means no clearing at all, whatever is available in other parts of the camera
DepthOnly should only look at what is at the right depth, but it seems not very accurate
Skybox is to fill in the blank box, it is estimated to be used for 3D
But for this 2d project of mine, all three are the same.
It is recommended to choose dontClear
Take a look at the official documentation for details!