#include "Containers/Map.h"
#include "Containers/Set.h"
#include "Logging/LogMacros.h"
#include "Templates/SharedPointer.h"
Go to the source code of this file.
◆ DECLARE_LOG_CATEGORY_EXTERN()
To add flags to StereoLayerComponents from plugins, please follow this procedure:
- Implement the IStereoLayersFlagsSupplier interface.
- Register the modular feature: IModularFeatures::Get().RegisterModularFeature(IStereoLayersFlagsSupplier::GetModularFeatureName(), this);
- Unregister the modular feature when the plugin is torn down: IModularFeatures::Get().UnregisterModularFeature(IStereoLayersFlagsSupplier::GetModularFeatureName(), this);
- Implement the EnumerateFlags(TSet<FName>& OutFlags) function, where you can add your flags. A simple implementation might be: void MyFlagSupplier::EnumerateFlags(TSet<FName>& OutFlags) { OutFlags.Add(FName("MY_FLAG_1")); OutFlags.Add(FName("MY_FLAG_2")); }
- It's up to the developers to make sure the flag values are not overflowing.
- At runtime, use TSharedPtr<FStereoLayerAdditionalFlagsManager> FlagsManager = FStereoLayerAdditionalFlagsManager::Get(); FlagsManager->GetFlagValue(Flag); to get flags value to check against the flags in your StereoLayerComponents.