I’ve been having some issues with my code, so I decided to start from something that knew works. I copied and pasted the “Camera” sample code into my own file, with only one change – I put the code inside a “new()” function because I’m using the director class to load different screens.
However, this simple change causes the code to behave differently. If I run the sample code, I see a red background with the text “Tap anywhere to launch Camera” written in white. However, when I copied and pasted the code, the white text disappeared.
Why?