Osero Suite by Jeren Osero
FabYouTubeJeren Osero
  • Osero Suite
  • About
  • Frequently Asked Questions
  • Support
  • Featured Assets
    • [FEATURED] Module Creator
  • Supported Assets
    • Module Creator
      • About
      • Changelog
      • How to Use (5.2+)
        • Tutorial
        • Accessing the Module Creator
        • UI Outline
        • Module Templates
        • Plugin Content
        • Project Settings
      • How To Use (Legacy 5.1)
      • Frequently Asked Questions
    • Plugin Sync Tool
      • About
      • Changelog
      • How to Use (5.2+)
        • Tutorial
        • Accessing the Plugin Sync Tool
        • UI Outline
        • Project Settings
      • How to Use (Legacy 5.1)
    • Render Results Screen
      • About
      • Changelog
      • How to Use (5.2+)
        • Tutorial
        • Making Sure the Plugin is Active
        • Movie Render Queue Job Additions
        • UI Outline
          • Render Results Window
          • Render Graph
          • Contact Sheet
        • Accessing Previous Render Results
        • Data Handler
        • Plugin Content
        • Project Settings
        • Code Reference
          • Classes
            • UOS_RRS_DataHandler
            • UOS_RRS_RenderDataLibrary
          • Structs
            • FOS_RRS_JobData
            • FOS_RRS_ResultData
            • FOS_RRS_ShotData
          • Enums
            • EOS_RRS_RenderResult
      • How to Use (Legacy 5.1)
  • TECHNICAL NOTES
    • Foreword
    • Unreal Engine Notes
      • Actor Components
        • Component Transforms
      • Blueprints
        • Add Function to Promotable Operator Nodes
      • Compile Errors
        • Implicit Capture of 'This' via '[=]' is Deprecated
        • Specified Type Modifiers Are Not Allowed Here
        • Static Function in Namespace Not Defined
        • Circular Dependency Detected
        • Inconsistent Dll Linkage
        • Overloaded Member Function Note Found (Compile Error in .gen File)
      • Debugging
        • UIAction.h Line 139
      • Details Customisation
        • Add External Property to Details Panel
        • Default Slate Styles
      • Ed Modes
        • Registering Editor Modes
      • Editor/Engine
        • Get Engine Version in C++
        • Extending the Editor with FExtender
      • Input
        • Get Key or Mouse Button in C++
        • Mouse Cursor Location in World (3D Space)
      • Level Editor
        • Select Actor Component via C++
      • Meta Specifiers
        • Reference
        • Edit Condition
        • Bind Widget
      • Rendering
        • Set Graphics Card Timeout
      • Sequencer
        • Project Default: Completion Mode
      • Slate
        • Default Editor Icons
        • Test Suite
        • Set Default Value for Slate Arguments
        • Cast Between Different Slate Classes
        • Set UObject Delegate for TAttribute<T>
      • Trace
        • Simple Line Trace
        • Complex Traces
          • ETraceTypeQuery
          • EObjectTypeQuery
      • UObject
        • "Config" Specifier Does not Work Properly in 5.4+
      • UPlugins
        • Loading Phases
      • UPROPERTIES
        • GetOptions (meta)
      • Viewport
        • Get Piloted Viewport Actor
        • Update Pivot Location
      • Water Plugin
        • General
        • C++ Summary
        • Details Customisation
        • Classes Overview
          • UWaterSplineMetadata
          • FWaterSplineComponentVisualizer
        • Water Meshes
    • Windows Notes
      • Get Around "This App Has Been Blocked For Your Protection"
      • Windows Keyboard Layout Boot Loop
      • Disable Copilot
      • Disable "Search the Web" in Windows Search
    • Visual Studio Notes
      • Turn Off Auto Brackets
      • Disable Unreal Engine Integration Log
  • BUY OSERO SUITE PRODUCTS
    • Fab
  • SOCIALS
    • YouTube
    • Rumble
    • Twitter/X
    • Instagram
    • LinkedIn
    • Jeren Osero Website
Powered by GitBook
On this page
  1. TECHNICAL NOTES
  2. Unreal Engine Notes
  3. Editor/Engine

Get Engine Version in C++

Last updated 3 days ago

// #if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 19 || ENGINE_MAJOR_VERSION == 5
// Is equal to
#if UE_VERSION_NEWER_THAN(4, 19, -1)
// but whole block can be reversed using UE_VERSION_OLDER_THAN macro
#if ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 19 || ENGINE_MAJOR_VERSION == 5
    // Some Code for UE4.19 and newer versions
#else
    // Some code for pre UE4.19 versions
#endif
// will be equivalent to
#if UE_VERSION_OLDER_THAN(4, 19, 0)
    // Some code for pre UE4.19 versions
#else 
    // Some Code for UE4.19 and newer versions
#endif

#define ENGINE_MAJOR_VERSION 5 #define ENGINE_MINOR_VERSION 2 #define ENGINE_PATCH_VERSION 1

This means it’s version 5.2.1.

Reference

Correct way to check Unreal Engine version in code.Medium
Logo