[Editor plugin]: FTickableGameObject or GetWorldTimerManager().SetTimer()?

Hi!

I am building my own plugin for TCP connection in Editor.

I’ve checked Rama’s tutorial and Alfalfa’s TCP Plugin.

First question: what is better for performance? Ticking or timer setting?

I have a feeling what ticking and would use Tick in my own method, but having problems with compilation as installed plugin, not with Engine source.

Can you advise me please how to setup Ticking properly for Editor’ plugin please? Alfaalfa’s code seems not working with compilation on PC outside of Engine Source…

Thank you in advance!

Prefer timers over Tick(). Usually, that is better performance.

SetTimer method for IModuleInterface class please?

Thank you, joeGraf, for advice!

But I’m stuck in very simple trouble (due I spent 2 years for JavaScripting and only now coming back to C++).

I am using in Editor plugin:


void Module::StartupModule()
{
	GEditor->GetTimerManager()->SetTimer(this, &Module::Tick, 1.0f, true);
}

void Module::Tick()
{
}

And getting the error: “You cannot use UObject method delegates with raw pointers”.

As far as I can understand, I can’t replace “->SetTimer” by “.SetTimer” due TSharedRef<FTimerManager> has no “SetTimer” method?

Can you advise me please a working way to setup timer for Editor plugin for module inherit IModuleInterface please?

Thank you in advance!