Answer the question
In order to leave comments, you need to log in
After the formation of the apk and the launch on the Androyd, the object disappears - Camera 2. What could be?
The project created 2 cameras (camera1, camera 2), switching between them was done through the screen rotation event.
Everything works in Unity. And if I make an apk and run it on the phone, then it looks like you can’t turn it only with camera1.
What can be? Where to dig?
void Update() {
ScreenOrientation screenOrientation = Application.isEditor ? editorOrientation: Screen.orientation;
if ( screenOrientation == ScreenOrientation.Portrait) {
camera1.enabled = false;
camera2.enabled = true;
}
else {
camera1.enabled = true;
camera2.enabled = false;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question