-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Regarding:
https://benui.ca/unreal/subsystem-singleton/
I found that you can override your c++ subsystem with a blueprint and this way be able to define data in it.
Here is an example.
First defining it Abstract for unreal so that the c++ version will not be created.
UCLASS(Abstract, Blueprintable)
class MY_API UQuestManager : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
UQuestManager();
// All quests.
UPROPERTY( EditAnywhere, BlueprintReadWrite )
TArray<UDA_QuestData*> quests;
};
In Unreal, make a new blueprint based of UQuestManager. In this one, set your data.
For the blueprint subsystem to work, the class needs to be refered so the system gets created.. (When you work on it, the editor will have it loaded and you might be fooled to think it works fine.) So in my case I added an array of object classes variable in my gameinstance, tricking unreal to load them.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels