3 Development Notes

This chapter describes issues identified when using the Pico Unreal SDK. Please check accordingly.

3.1 Enable device USB Debugging on device

Please check details from this FAQ link on How to enable Developer mode

3.2 Android Manifest Document

  • Add necessary configuration, which has been added by default. If you use a custom AndroidManifest, make sure to add the following configuration:

<meta-data android:name=”pvr.app.type” android:value=”vr” />

3.3 Known Issues

  • “Virtual reality preview” in the scene editor is not supported.
_images/3.3.1.png

Figure 3.1 Does not support virtual reality preview

  • Checking HDR option might introduce issues, such as fuzzy images, rendering lag (during head movements), screen mosaics, display turning white, etc. Unchecking Mobile HDR is recommended.
_images/3.3.2.png

Figure 3.2 Uncheck Mobile HDR

  • In Git project management, it is recommended to delete .so and .jar in the file .gitignore.
_images/3.3.3.png

Figure 3.3 Delete .so tag

The PicoXR plugin contains .so and .jar files. When using git or other software for project maintenance, developers should not ignore the .so and .jar files in .gitignore . Deleting these two is recommended.

  • Frame rate limitation in UE4.24 will cause time-flow anomalies.
_images/3.3.4.png

Figure 3.4 Unreal frame rate limit option

In version 4.24, if you check the two checkboxes above or use corresponding methods in C++ code to limit frames, it will cause an abnormal time flow rate in the game. It is recommended that developers do not use either of these methods for frame-limiting operations within this release. Alternatively, choose another engine version.

  • Version 4.24 has deprecated OpenGLES2, so it is recommended that developers do not use OpenGLES2 for packaging when developing with version 4.24. This may lead to issues, such as crashing in certain levels.
  • In 4.24 and higher versions, there is the built-in TimeOfDay scene in the newly created scene. It is designed for displaying the rendering capability of PC end. It is not recommended to use this scene on the mobile end.
  • It is recommended to delete Daydream-related settings under Project Settings-Android-Advanced APK Packaging and package for Oculus mobile devices, as shown below:
_images/3.3.5.png

Figure 3.5 Delete related settings

  • Under non-Shipping mode of version 4.26, adding Landscape and modifying its number of component property will cause a crash.
  • Under version 4.26, opening Multi View and FFR at the same time will cause an abnormal display.
  • Cast Modulated Shadows is not supported, some Unreal templates enable this option by default and may cause abnormal shadows. Please disable it when using directional lights.
_images/3.3.6.png

Figure 3.6 Disable Directional Light Cast Modulated Shadows

  • When using StereoLayer, rotating the camera causes StereoLayer to rotate.
  • When using Vulkan based on Unreal 4.25 (source version), switching levels might cause random crash. It can be avoided by modifying the engine source code. Please try commenting out the method of the file EngineSourceRuntimeVulkanRHIPrivateVulkanTexture.cpp
if (!CreateInfo.BulkData)
{
    //if(-1 != GVulkanOverrideInitialTextureLayout && 0 == (UEFlags & (TexCreate_RenderTargetable | TexCreate_DepthStencilTargetable)))
    //{
    //        TransitionInitialImageLayout(Device, Surface.Image, (VkImageLayout)GVulkanOverrideInitialTextureLayout, Surface.GetFullAspectMask());
    //}
    //else
    //{
    //        // No initial data, so undefined
    //        InsertInitialImageLayout(Device, Surface.Image, VK_IMAGE_LAYOUT_UNDEFINED);
    //}
    InsertInitialImageLayout(Device, Surface.Image, VK_IMAGE_LAYOUT_UNDEFINED);
    return;
}
  • Random crash when using splash screen with Vulkan. To use Splash Screen, please modify the engine code as follow:
//..\Engine\Source\Runtime\VulkanRHI\Private\VulkanBarriers.cpp
void FVulkanImageLayout::Set(VkImageLayout Layout, const VkImageSubresourceRange& SubresourceRange)
{
      //...Omit, the above code is retained
      for (uint32 Layer = FirstLayer; Layer < FirstLayer + LayerCount; ++Layer)
      {
              for (uint32 Mip = FirstMip; Mip < FirstMip + MipCount; ++Mip)
              {
                      if ((Layer * NumMips + Mip)<(uint32)SubresLayouts.Num())
                      {
                              SubresLayouts[Layer * NumMips + Mip] = Layout;
                      }
                      else
                      {
                              SubresLayouts.Add(Layout);
                      }
              }
      }
      //...
}
//..\Engine\Source\Runtime\VulkanRHI\Private\VulkanBarriers.h
      VkImageLayout FindLayoutChecked(VkImage Image) const
      {
             /*const FVulkanImageLayout& Layout = Layouts.FindChecked(Image);*/
              const auto* Pair = Layouts.Find(Image);
              if (Pair == nullptr)
              {
                      return VkImageLayout::VK_IMAGE_LAYOUT_UNDEFINED;
              }
              else
              {
                      const FVulkanImageLayout& Layout = *Pair;
                      check(Layout.AreAllSubresourcesSameLayout());
                      return Layout.MainLayout;
              }
      }