Skip to content

Commit

Permalink
Added 'CallableWithoutWorldContext' meta to the static functions with…
Browse files Browse the repository at this point in the history
… optional World Context, so they can be called anywhere
  • Loading branch information
JanSeliv committed Apr 20, 2024
1 parent 5983eb2 commit e39ec02
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified Binaries/Win64/UnrealEditor-PoolManager.dll
Binary file not shown.
Binary file modified Binaries/Win64/UnrealEditor-PoolManager.pdb
Binary file not shown.
4 changes: 2 additions & 2 deletions Source/PoolManager/Public/PoolManagerSubsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ class POOLMANAGER_API UPoolManagerSubsystem : public UWorldSubsystem
/** Returns the pointer to the Pool Manager.
* Is useful for blueprints to obtain **default** Pool Manager.
* @param OptionalWorldContext is optional parameter and hidden in blueprints, can be null in most cases, could be useful to avoid obtaining the world automatically. */
UFUNCTION(BlueprintPure, meta = (WorldContext = "OptionalWorldContext"))
UFUNCTION(BlueprintPure, meta = (WorldContext = "OptionalWorldContext", CallableWithoutWorldContext))
static UPoolManagerSubsystem* GetPoolManager(const UObject* OptionalWorldContext = nullptr) { return GetPoolManagerByClass(StaticClass(), OptionalWorldContext); }

/** Returns the pointer to custom Pool Manager by given class.
* Is useful for blueprints to obtain your **custom** Pool Manager.
* @param OptionalClass is optional, specify the class if you implemented your own Pool Manager.
* @param OptionalWorldContext is optional parameter and hidden in blueprints, can be null in most cases, could be useful to avoid obtaining the world automatically. */
UFUNCTION(BlueprintPure, meta = (WorldContext = "OptionalWorldContext", DeterminesOutputType = "OptionalClass", BlueprintAutocast))
UFUNCTION(BlueprintPure, meta = (WorldContext = "OptionalWorldContext", CallableWithoutWorldContext, DeterminesOutputType = "OptionalClass", BlueprintAutocast))
static UPoolManagerSubsystem* GetPoolManagerByClass(TSubclassOf<UPoolManagerSubsystem> OptionalClass = nullptr, const UObject* OptionalWorldContext = nullptr);

/*********************************************************************************************
Expand Down

0 comments on commit e39ec02

Please sign in to comment.