7 if (!InObject || UpdateHTZ < 1)
15 if (!InObject || UpdateHTZ < 1)
24 if (!Delegate.IsBound())
40 if (!Delegate.IsBound())
94 if (IsTemplate(RF_ClassDefaultObject))
95 return ETickableTickType::Never;
97 return ETickableTickType::Conditional;
147 if (Obj && Obj->FindFunction(FuncName))
169 for (
int i =
Callbacks.Num() - 1; i >= 0; --i)
187 TArray<uint32> BucketsToRemove;
190 if (!Bucket.Value.Update(DeltaTime))
193 BucketsToRemove.Add(Bucket.Key);
198 for (
const uint32 Key : BucketsToRemove)
209 if (!InObject || InObject->FindFunction(FunctionName) ==
nullptr || UpdateHTZ < 1)
234 if (!Delegate.IsBound() || UpdateHTZ < 1)
258 if (!ObjectToRemove || ObjectToRemove->FindFunction(FunctionName) ==
nullptr)
262 bool bRemovedObject =
false;
264 TArray<uint32> BucketsToRemove;
267 for (
int i = Bucket.Value.Callbacks.Num() - 1; i >= 0; --i)
269 if (Bucket.Value.Callbacks[i].IsBoundToObjectFunction(ObjectToRemove, FunctionName))
271 Bucket.Value.Callbacks.RemoveAt(i);
272 bRemovedObject =
true;
285 return bRemovedObject;
290 if (!DynEvent.IsBound())
294 bool bRemovedObject =
false;
296 TArray<uint32> BucketsToRemove;
299 for (
int i = Bucket.Value.Callbacks.Num() - 1; i >= 0; --i)
301 if (Bucket.Value.Callbacks[i].IsBoundToObjectDelegate(DynEvent))
303 Bucket.Value.Callbacks.RemoveAt(i);
304 bRemovedObject =
true;
317 return bRemovedObject;
326 bool bRemovedObject =
false;
328 TArray<uint32> BucketsToRemove;
331 for (
int i = Bucket.Value.Callbacks.Num() - 1; i >= 0; --i)
333 if (Bucket.Value.Callbacks[i].IsBoundToObject(ObjectToRemove))
335 Bucket.Value.Callbacks.RemoveAt(i);
336 bRemovedObject =
true;
341 return bRemovedObject;
350 for (
int i = Bucket.Value.Callbacks.Num() - 1; i >= 0; --i)
352 if (Bucket.Value.Callbacks[i].IsBoundToObject(ObjectToRemove))
368 for (
int i = Bucket.Value.Callbacks.Num() - 1; i >= 0; --i)
370 if (Bucket.Value.Callbacks[i].IsBoundToObjectFunction(ObjectToRemove, FunctionName))
382 if (!DynEvent.IsBound())
387 for (
int i = Bucket.Value.Callbacks.Num() - 1; i >= 0; --i)
389 if (Bucket.Value.Callbacks[i].IsBoundToObjectDelegate(DynEvent))
bool RemoveObjectFromBucketByEvent(UPARAM(DisplayName="Event") FDynamicBucketUpdateTickSignature Delegate)
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Remove Object From Bucket Updates By Event",...
virtual ETickableTickType GetTickableTickType() const
bool IsObjectFunctionInBucket(UObject *InObject=nullptr, FName FunctionName=NAME_None)
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Is Object In Bucket", ScriptName = "IsObjectInBuc...
virtual bool IsTickableWhenPaused() const override
bool RemoveObjectFromAllBuckets(UObject *InObject=nullptr)
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Remove Object From All Bucket Updates",...
bool IsActive()
UFUNCTION(BlueprintPure, Category = "BucketUpdateSubsystem")
virtual UWorld * GetTickableGameObjectWorld() const override
virtual bool IsTickableInEditor() const
bool AddObjectToBucket(int32 UpdateHTZ, UObject *InObject, FName FunctionName)
virtual bool IsTickable() const override
bool RemoveObjectFromBucketByFunctionName(UObject *InObject=nullptr, FName FunctionName=NAME_None)
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Remove Object From Bucket Updates By Function",...
bool K2_AddObjectEventToBucket(UPARAM(DisplayName="Event") FDynamicBucketUpdateTickSignature Delegate, int32 UpdateHTZ=100)
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Add Object to Bucket Updates by Event",...
bool K2_AddObjectToBucket(int32 UpdateHTZ=100, UObject *InObject=nullptr, FName FunctionName=NAME_None)
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Add Object to Bucket Updates",...
FUpdateBucketContainer BucketContainer
virtual void Tick(float DeltaTime) override
virtual TStatId GetStatId() const override
UCLASS(NotBlueprintable, BlueprintType, EditInlineNew, DefaultToInstanced, Abstract,...
bool IsObjectInBucket(UObject *ObjectToRemove)
void UpdateBuckets(float DeltaTime)
TMap< uint32, FUpdateBucket > ReplicationBuckets
bool RemoveObjectFromAllBuckets(UObject *ObjectToRemove)
bool IsObjectFunctionInBucket(UObject *ObjectToRemove, FName FunctionName)
bool RemoveBucketObject(UObject *ObjectToRemove, FName FunctionName)
bool AddBucketObject(uint32 UpdateHTZ, UObject *InObject, FName FunctionName)
bool IsObjectDelegateInBucket(FDynamicBucketUpdateTickSignature &DynEvent)
bool IsBoundToObjectDelegate(FDynamicBucketUpdateTickSignature &DynEvent)
bool ExecuteBoundCallback()
FDynamicBucketUpdateTickSignature DynamicCallback
bool IsBoundToObjectFunction(UObject *Obj, FName &FuncName)
FBucketUpdateTickSignature NativeCallback
bool IsBoundToObject(UObject *Obj)
bool Update(float DeltaTime)
TArray< FUpdateBucketDrop > Callbacks