F
F
Fangahra2015-08-13 13:33:28
Android
Fangahra, 2015-08-13 13:33:28

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

1 answer(s)
F
Fangahra, 2015-08-13
@Fangahra

When assembling, I specified permission only for horizontal playback. Corrected.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question