RealDocs

AActor::AllowReceiveTickEventOnDedicatedServer

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: inlineconst

Description

Returns whether the Blueprint ReceiveTick event is allowed to fire on dedicated servers. When false, Tick is still called in C++ but the Blueprint event is suppressed on the server.

Caveats & Gotchas

  • This flag only controls the Blueprint ReceiveTick() implementable event — the C++ Tick() virtual is always called regardless of this setting, so server-side C++ tick logic is unaffected.
  • The flag is stored as bAllowReceiveTickEventOnDedicatedServer (a UPROPERTY). You cannot set it via this accessor — change the underlying UPROPERTY directly in the CDO or via defaults.

Signature

inline bool AllowReceiveTickEventOnDedicatedServer() const { return bAllowReceiveTickEventOnDedicatedServer; }

Return Type

bool

Example

Check before running Blueprint-equivalent server logic C++
void AMyActor::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	// AllowReceiveTickEventOnDedicatedServer() tells you whether
	// Blueprint's ReceiveTick would also run on a DS.
	if (!AllowReceiveTickEventOnDedicatedServer() && GetNetMode() == NM_DedicatedServer)
	{
		// Blueprint tick is suppressed here; handle server logic only in C++
	}
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.