LogoLogo
API Status
  • 👋Welcome
  • 🌐What is Morpheus Platform?
    • Interoperability
  • â„šī¸Help
    • 📗Glossary
    • 🆘Support
    • Firewall problems
    • EULA
  • CREATION
    • 🎮Unreal Development
      • ⚡Get Started
        • âš’ī¸Download the Editor
        • âĢUpload Content
        • 🌎Creating your own map
        • 📝Morpheus Base Project
        • ❓Differences from Unreal
          • 🧍Character Configuration
        • 📡Morpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • 📚Features & Guides
        • 📒Example Plugin
          • Nameplates
          • In-game roles
          • Resizing
        • 🏊Actor Pooling
        • 🔊Audio
        • 🎭Avatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • 🤖Bots
        • đŸŽ™ī¸Chat
          • Unreal Text Chat
        • đŸŽ›ī¸Control Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • 🔉Crowd Audio
        • đŸ¤ŧCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • 🍱Helpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • đŸ–Ĩī¸Loading Screen
        • ⚡Live Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • 🧊MML
        • đŸ•ēMotion Capture
        • 📡Networking
        • đŸ“ĸNotifications
        • Raycastable Crowd
        • 🌐Singletons
        • 📱Streaming & Multiplatform
          • GFN on mobile
        • đŸ–Ĩī¸UI
          • "UI Mode"
        • đŸ—ƒī¸User Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • đŸ“ēVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • 🐞Visual Debugging
          • Inspector
        • đŸĒŸWeb UI
        • Online Services
          • KV Store Service
        • 💠Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • âœˆī¸World Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • 🔑Workflows
        • â†—ī¸Upgrade the Editor
          • đŸ–Ĩī¸Version History
        • âš™ī¸Editing Project Settings
        • 📈Profiling
        • đŸ§ēMarketplace Importing
        • đŸ› ī¸Extra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • 📚Useful Reading
        • ⭐Best Practices
    • 🌎Worlds
      • 📩Invite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • 📅Running events
      • ✅Large scale events - Checklist
      • 👾Anti-Cheat (EAC)
      • 🎮Player Entry
        • 📱React Native
        • Steam
        • đŸ’ģHardware Reqs
      • đŸŽĨBroadcast
        • 📹OBS Integration
      • Failover
      • 🏁Capacity And Queue Management
  • ADMINS
    • đŸ‘ĒAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • 💲Pricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • âš™ī¸Settings
      • đŸ—ƒī¸Projects
  • APIs and Tooling
    • đŸ–Ĩī¸API Reference
      • Accounts
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • User Profile
      • World Builder
      • Worlds
    • đŸ’ģTemplate Web App
      • đŸ’ĸModeration
    • Pixel Streaming
    • 🚀Launcher
  • Integrations
    • 📊Analytics
      • Sending events from web
      • 🎮Sending Events from Unreal
    • đŸ’ŦChat
      • 🎮Integrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page
  • Input text boxes bringing up virtual keyboards
  • Some context on the problem
  • How to define GFN regions

Was this helpful?

  1. CREATION
  2. Unreal Development
  3. Features & Guides
  4. Streaming & Multiplatform

GFN on mobile

PreviousStreaming & MultiplatformNextUI

Last updated 5 months ago

Was this helpful?

When running a game through GFN on a mobile device, there are some extra considerations to make, that will require manual work in your project:

Input text boxes bringing up virtual keyboards

Some context on the problem

On mobile, to be able to type in in-game text boxes, since you will most likely not have a keyboard attached, you will need to bring up a virtual keyboard.

Unfortunately, this is not done automatically for you. GFN has no game knowledge to know when to bring up the virtual keyboard, and this cannot be triggered by the game when the keyboard is focused. Instead, the way GFN works is by defining "action zones", that will trigger a certain action when touched. If you define a "GFN Edit Box" over the in-game editable text box, then tap on that region, then the editable text box will be focused, and so take input text, and the virtual keyboard will be brought up, allowing you to type. If either of these don't happen you will be unable to enter the text (if the keyboard is brought up, but the in-game widget is not focused, then the widget will not receive the typed text)

Known issue: On iOS, there seems to be a bug with this flow. Tapping on an input box that has a GFN action zone over the top will sometimes both focus the in-game text box and bring up the keyboard, but will sometimes only do one or the other action, meaning you are incapable of typing into the in-game text box. This is pretty finnicky, but usually works after a few attempts. This is being investigated.

How to define GFN regions

NOTE: The following functionality is present from release v33. If you are on an earlier release, please get in touch for alternative solutions.

GFN Regions can be defined with the UpdateGFNRegionForWidget helper function. This takes a widget and a GFN Input ID integer. This integer is used to associate the region with a specific widget, so that moving or hiding the widget updates the right corresponding region.

To get a unique ID for your particular widget, you can call GetNextGFNInputId

Internally, this calls either DisableGFNEditableTextBoxRegion, which turns off the "GFN Edit Box" associated with the provided ID, or calls SetGFNEditableTextBoxRegion, which makes a "GFN Edit Box" of the assigned dimensions for the provided ID. We have a helper function SetGFNRegionForWidget that gets the bounds of the provided widget and uses them as the text box region.

Important: This function uses GetCachedGeometry to determine the bounds of the widget. This function gets the last geometry used to tick the widget. This may not be the correct geometry if called too early, e.g. if you are moving the widget, or the widget was only recently constructed. For this reason, we recommend waiting a couple of ticks after construction (or having stopped moving the widget) before calling it.

NOTE: Since this edit box is entirely separate to the Unreal game itself, it has no knowledge of whether the associated widget is visible or not. It is your responsibility to maintain the edit box, e.g. by recalling UpdateGFNRegionForWidget whenever your widget moves or is hidden.

See WBP_M2Example_SettingsMenu for an example of GFN regions being managed. On construction, it reserves GFN Input Ids for each EditableTextBox widget, and when the settings menu is shown or hidden, it refreshes the GFN regions for each widget.

NOTE: It adds two frames of delay, to make sure that calling GetCachedGeometry on the widget returns the correct size and position. Without the delay, the widget may not have been drawn to the screen yet, and so may not have any geometry to retrieve. (You can test this by adding a breakpoint inside SetGFNRegionForWidget and observing the value being passed into TopLeftPosition - is it (0,0), instead of what you'd expect it to be?)

🎮
📚
📱
An example of an in-game editable text box. The blue outline shows the bounds of the widget - a GFN edit box would need to be created with these bounds so that it matches the focusable region of the widget underneath