Sep 17, 2020.Knowledge
Native Gameplay tags need to be loaded very early during engine initialization for replication purposes. A common approach is to load native gameplay tags using the function UGameplayTagsManager::AddNativeGameplayTag during engine initialization. Adding native tags in an object that is created early, such as UDeveloperSettings is often good enough for most projects, but if you run into dependency issues because of loading order there is another option. In Fortnite we add our tags inside FEngineLoop::PreInitPostStartupScreen. We don’t explicitly call the function that adds them there. Instead, we have a class for holding all of the tags and a static variable of the class type that is accessed through a static function, so it can be called globally. This static variable gets created as a side effect of one of the first CDOs to be created. This is a good approach if you want to ensure that all of your native tags are loaded well before anything else will need to access them.