Updated to engine version 4.24.

This commit is contained in:
Sebastian 2020-01-27 21:51:42 +00:00
parent 05d7c5c48b
commit 848e7294c8
7 changed files with 34 additions and 12 deletions

View File

@ -5,6 +5,9 @@ Versions marked as 'unofficial' are labelled only for the needs of this changelo
Change History Change History
-------------- --------------
Version: 1.18 (2020/01)
- Updated to engine version 4.24.
Version: 1.17 (2019/04) Version: 1.17 (2019/04)
- Added experimental support for touch input. - Added experimental support for touch input.
- Integrated fixes allowing to build this as an engine plugin: - Integrated fixes allowing to build this as an engine plugin:

View File

@ -1,7 +1,7 @@
{ {
"FileVersion": 3, "FileVersion": 3,
"Version": 1, "Version": 1,
"VersionName": "1.16", "VersionName": "1.18",
"FriendlyName": "ImGui", "FriendlyName": "ImGui",
"Description": "", "Description": "",
"Category": "Debug", "Category": "Debug",
@ -10,7 +10,7 @@
"DocsURL": "", "DocsURL": "",
"MarketplaceURL": "", "MarketplaceURL": "",
"SupportURL": "", "SupportURL": "",
"CanContainContent": true, "CanContainContent": false,
"IsBetaVersion": false, "IsBetaVersion": false,
"Installed": false, "Installed": false,
"Modules": [ "Modules": [

View File

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2017-2019 Sebastian Gross Copyright (c) 2017-2020 Sebastian Gross
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -13,7 +13,7 @@ Version: 1.17
ImGui version: 1.65 ImGui version: 1.65
Supported engine version: 4.22* Supported engine version: 4.24*
\* *Plugin has been tested and if necessary updated to compile and work with this engine version. As long as possible I will try to maintain backward compatibility of existing features and possibly but not necessarily when adding new features. Right now it should be at least backward compatible with the engine version 4.15.* \* *Plugin has been tested and if necessary updated to compile and work with this engine version. As long as possible I will try to maintain backward compatibility of existing features and possibly but not necessarily when adding new features. Right now it should be at least backward compatible with the engine version 4.15.*
@ -41,6 +41,12 @@ Content of this repository needs to be placed in the *Plugins* directory under t
Note that plugins can be also placed in the engine directory *[UE4 Root]/Engine/Plugins/* but I didn't try it with this project. Note that plugins can be also placed in the engine directory *[UE4 Root]/Engine/Plugins/* but I didn't try it with this project.
### Setting module type
The *ImGui* module type is set to **Developer**, what means that if it is not referenced by other runtime modules, it can be automatically excluded from shipping builds. This is convenient when using this plugging for debugging but if you want to change it to other type, you can do it in module description section in `ImGui.uplugin` file.
**Developer** type was depreciated in UE 4.24. I keep it for backward compatibility while I can, but if you get a UBT warning about module type, simply change it to **DeveloperTool** or **Runtime**.
### Setting up module dependencies ### Setting up module dependencies
To use ImGui in other modules you need to add it as a private or public dependency in their Build.cs files: To use ImGui in other modules you need to add it as a private or public dependency in their Build.cs files:

View File

@ -98,11 +98,18 @@ void FImGuiContextManager::Tick(float DeltaSeconds)
} }
} }
#if ENGINE_COMPATIBILITY_LEGACY_WORLD_ACTOR_TICK
void FImGuiContextManager::OnWorldTickStart(ELevelTick TickType, float DeltaSeconds) void FImGuiContextManager::OnWorldTickStart(ELevelTick TickType, float DeltaSeconds)
{ {
if (GWorld) OnWorldTickStart(GWorld, TickType, DeltaSeconds);
}
#endif
void FImGuiContextManager::OnWorldTickStart(UWorld* World, ELevelTick TickType, float DeltaSeconds)
{
if (World)
{ {
FImGuiContextProxy& ContextProxy = GetWorldContextProxy(*GWorld); FImGuiContextProxy& ContextProxy = GetWorldContextProxy(*World);
// Set as current, so we have right context ready when updating world objects. // Set as current, so we have right context ready when updating world objects.
ContextProxy.SetAsCurrent(); ContextProxy.SetAsCurrent();
@ -117,7 +124,7 @@ void FImGuiContextManager::OnWorldTickStart(ELevelTick TickType, float DeltaSeco
#if ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK #if ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK
void FImGuiContextManager::OnWorldPostActorTick(UWorld* World, ELevelTick TickType, float DeltaSeconds) void FImGuiContextManager::OnWorldPostActorTick(UWorld* World, ELevelTick TickType, float DeltaSeconds)
{ {
GetWorldContextProxy(*GWorld).DrawDebug(); GetWorldContextProxy(*World).DrawDebug();
} }
#endif // ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK #endif // ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK

View File

@ -80,7 +80,10 @@ private:
TUniquePtr<FImGuiContextProxy> ContextProxy; TUniquePtr<FImGuiContextProxy> ContextProxy;
}; };
#if ENGINE_COMPATIBILITY_LEGACY_WORLD_ACTOR_TICK
void OnWorldTickStart(ELevelTick TickType, float DeltaSeconds); void OnWorldTickStart(ELevelTick TickType, float DeltaSeconds);
#endif
void OnWorldTickStart(UWorld* World, ELevelTick TickType, float DeltaSeconds);
#if ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK #if ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK
void OnWorldPostActorTick(UWorld* World, ELevelTick TickType, float DeltaSeconds); void OnWorldPostActorTick(UWorld* World, ELevelTick TickType, float DeltaSeconds);

View File

@ -9,22 +9,25 @@
// One place to define compatibility with older engine versions. // One place to define compatibility with older engine versions.
// Starting from version 4.17 Slate has an improved clipping API. Old version required to specify per-vertex clipping // Starting from version 4.17, Slate has an improved clipping API. Old version required to specify per-vertex clipping
// rectangle and unofficial GSlateScissorRect to correctly clip custom vertices made with FSlateDrawElement. // rectangle and unofficial GSlateScissorRect to correctly clip custom vertices made with FSlateDrawElement.
#define ENGINE_COMPATIBILITY_LEGACY_CLIPPING_API BELOW_ENGINE_VERSION(4, 17) #define ENGINE_COMPATIBILITY_LEGACY_CLIPPING_API BELOW_ENGINE_VERSION(4, 17)
// Starting from version 4.18 FPaths::GameSavedDir() has been superseded by FPaths::ProjectSavedDir(). // Starting from version 4.18, FPaths::GameSavedDir() has been superseded by FPaths::ProjectSavedDir().
#define ENGINE_COMPATIBILITY_LEGACY_SAVED_DIR BELOW_ENGINE_VERSION(4, 18) #define ENGINE_COMPATIBILITY_LEGACY_SAVED_DIR BELOW_ENGINE_VERSION(4, 18)
// Starting from version 4.18 we have support for dual key bindings. // Starting from version 4.18, we have support for dual key bindings.
#define ENGINE_COMPATIBILITY_SINGLE_KEY_BINDING BELOW_ENGINE_VERSION(4, 18) #define ENGINE_COMPATIBILITY_SINGLE_KEY_BINDING BELOW_ENGINE_VERSION(4, 18)
// Starting from version 4.18 FStringClassReference is replaced by FSoftClassPath. The new header contains a typedef // Starting from version 4.18, FStringClassReference is replaced by FSoftClassPath. The new header contains a typedef
// that renames FStringClassReference to FSoftClassPath, so it is still possible tu use the old type name in code. // that renames FStringClassReference to FSoftClassPath, so it is still possible tu use the old type name in code.
// The old header forwards to the new one but if used it outputs a warning, so we want to avoid it. // The old header forwards to the new one but if used it outputs a warning, so we want to avoid it.
#define ENGINE_COMPATIBILITY_LEGACY_STRING_CLASS_REF BELOW_ENGINE_VERSION(4, 18) #define ENGINE_COMPATIBILITY_LEGACY_STRING_CLASS_REF BELOW_ENGINE_VERSION(4, 18)
// Starting from version 4.18 engine has a world post actor tick event which if available, provides a good opportunity // Starting from version 4.18, engine has a world post actor tick event which if available, provides a good opportunity
// to call debug delegates after world actors are already updated. // to call debug delegates after world actors are already updated.
#define ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK FROM_ENGINE_VERSION(4, 18) #define ENGINE_COMPATIBILITY_WITH_WORLD_POST_ACTOR_TICK FROM_ENGINE_VERSION(4, 18)
// Starting from version 4.24, world actor tick event has additional world parameter.
#define ENGINE_COMPATIBILITY_LEGACY_WORLD_ACTOR_TICK BELOW_ENGINE_VERSION(4, 24)