Where is IModuleInterface->Tick/Run method?

I dont get it.

How and where to update/tick module?

Hi newbprofi,

there is no such method in the module interface. You can see the IModuleInterface as your entry point for what you have to do (typically initialize any system you want).

For example, your plugin interface is the one that will register every custom asset thumbnail renderer, every custom details view, your custom asset type actions, etc…

You might need to create custom components/actors/assets for your plugin, which will be “tickable” by the world they are registered into.

Hope this helps

Hi, I am integrating a third party library into Unreal 4.17 via a plugin module. This library has various things that regularly need updating, ideally in some sort of global per-frame (or less) tick. The Actor/Component tick isn’t appropriate as there are likely to be multiple instances, yet only one library frame tick needed for all of their associated library state. To support this I added a Tick method to my module and registered it with the core FTicker instance like this:

// in StartupModule()
TickDelegate = FTickerDelegate::CreateRaw( this, &FMyRuntimeModule::Tick );
TickDelegateHandle = FTicker::GetCoreTicker().AddTicker( TickDelegate );

NOTE: The AddTicker method takes an optional parameter for the tick period if you want ticks less often than once per engine tick (frame).
This then invokes the handler thus:

bool FMyRuntimeModule::Tick( float DeltaTime )
{
	MyExternalLibrary::Update( DeltaTime );
	return true;
}

Not forgetting to unregister the handler at shutdown:

// in ShutdownModule()
FTicker::GetCoreTicker().RemoveTicker(TickDelegateHandle);

The module header members required are:

FTickerDelegate TickDelegate;
FDelegateHandle TickDelegateHandle;

Which require the following header:

#include "Containers/Ticker.h"

That should provide all you need to get things ticking along nicely. :slight_smile:

Sam

1 Like

this is the correct answer