Skip to content

Commit

Permalink
PluginLoader: Add add_component_by_class implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Dec 1, 2024
1 parent 30ed0de commit dd6b86a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mods/PluginLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <sdk/FBoolProperty.hpp>
#include <sdk/FStructProperty.hpp>
#include <sdk/FEnumProperty.hpp>
#include <sdk/AActor.hpp>

#include "pluginloader/FFakeStereoRenderingFunctions.hpp"
#include "pluginloader/FRenderTargetPoolHook.hpp"
Expand Down Expand Up @@ -292,6 +293,10 @@ UEVR_SDKFunctions g_sdk_functions {
[]() -> UEVR_FConsoleManagerHandle {
return (UEVR_FConsoleManagerHandle)sdk::FConsoleManager::get();
},
// add_component_by_class
[](UEVR_UObjectHandle actor, UEVR_UClassHandle klass, bool deferred) -> UEVR_UObjectHandle {
return (UEVR_UObjectHandle)((sdk::AActor*)actor)->add_component_by_class((sdk::UClass*)klass, deferred);
}
};

namespace uevr {
Expand Down

0 comments on commit dd6b86a

Please sign in to comment.