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
  • Setting up your HUD
  • A note on ZOrder
  • Making a "Settings Menu"
  • Other Useful Links

Was this helpful?

  1. CREATION
  2. 🎮Unreal Development
  3. 📚Features & Guides

đŸ–Ĩī¸UI

PreviousGFN on mobileNext"UI Mode"

Last updated 4 months ago

Was this helpful?

In MSquared, our core offering is intended to be fairly light on UI elements, just adding the minimum required to showcase our features. The expectation is that downstream projects can add UI to their own project however they like, in the same flows as native Unreal (we make no changes to Unreal's default flow).

Setting up your HUD

If you want a starting point for adding UI to your project, see how it is done in the Example content:

  • A HUD class is defined in the chosen game mode

  • This HUD class spawns a user widget that contains your HUD elements

  • This "HUD widget" contains a canvas panel with all the on-screen widgets added, positioned and anchored to the screen how they are intended to show up in-game.

    • (Individual widgets can then be collapsed when they are meant to be hidden, either through the HUD widget, or managed by the widget itself)

There are two common approaches to designing a HUD, either by having all the widgets added to a central HUD widget, or having each widget get individually added to the viewport/player screen (or some combination of the two approaches). The benefit of the former is that all your widgets are in one place, making it easier, but the trade-off is that the widget can get very bloated if you have a lot of UI elements. It is up to the project to determine what setup is the best fit for them.

A note on ZOrder

If you want to achieve "Layers" in your project, i.e. having certain widgets appear in front of other widgets, the easiest way is by setting the ZOrder. Widgets with a higher ZOrder will be drawn on top of widgets with a lower ZOrder, which you can use to e.g. make sure your settings menu appears on top of your normal in-game UI.

NOTE: It is recommended to be consistent whether you are using AddToPlayerScreen or AddToViewport. Both can be used, but the "player screen" is always beneath the "viewport", regardless of the ZOrder used for each.

Making a "Settings Menu"

WBP_M2Example_SettingsMenu is an example of a simple settings menu, triggered from the HUD widget, and shows how to modify a number of in-game settings. This includes:

  • Arbitrary custom settings: Using the OnCustomSettingChanged, GetCustomSetting and SetCustomSetting helpers in J_GameUserSettings, you can save arbitrary custom string values to named settings. These will then persist across plays of the game for the same client (e.g. if you close the application/PIE then reopen it, the values will remain the same).

Other Useful Links

  • See Streaming & Multiplatform (and GFN on mobile) for some additional details on setting up UI that handles mobile (including streaming to mobile) correctly

  • See M2Extras: Skins System for a simple example of achieving "UI skins" for a project, i.e. having the same UI appear differently in different circumstances.

Graphics settings: See

Volume settings: See

Volume Settings
User Settings
The M2Example content, such as the ExampleMaphas some basic UI in it, which can be used as a reference or starting point for downstream projects.