hi,
code works only for orientation landscape, but how can i get back to portrait?
void UMyUserWidget::ToggleOrientation(bool isPortrait)
{
#if PLATFORM_ANDROID || PLATFORM_IOS
JNIEnv* JE = FAndroidApplication::GetJavaEnv();
jmethodID SetOrientationID = FJavaWrapper::FindMethod(JE, FJavaWrapper::GameActivityClassID, "setRequestedOrientation", "(I)V", isPortrait);
FJavaWrapper::CallVoidMethod(JE, FJavaWrapper::GameActivityThis, SetOrientationID, 0);
#else
#endif
}
I have tried IsPortrait because I saw false and true but not works.