Made the codgen run on async

This commit is contained in:
2024-10-21 22:58:24 -04:00
parent a1a5f2f309
commit d4bf7cfaec
6 changed files with 114 additions and 94 deletions

View File

@ -16,6 +16,9 @@ public:
// NOTE(Ed): Any Soft-References must have their includes defined in GasaDevOptions.cpp
// They are used by GasaGen for the GasaDevOptionsCache
UPROPERTY(Config)
TSoftObjectPtr<UDataTable> RandomBullshit;
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="GAS")
TArray< TSoftObjectPtr<UDataTable>> AttributeSets;

View File

@ -11,6 +11,9 @@ void FGasaDevOptionsCache::CachedDevOptions()
{
UGasaDevOptions* DevOpts = GetMutDevOptions();
RandomBullshit = DevOpts->RandomBullshit.LoadSynchronous();
ensureMsgf( RandomBullshit != nullptr, TEXT( "RandomBullshit is null, DO NOT RUN PIE or else you may get a crash if not handled in BP or C++" ) );
for ( auto& entry : DevOpts->AttributeSets )
{
AttributeSets.Push( entry.LoadSynchronous() );

View File

@ -8,6 +8,8 @@ struct GASA_API FGasaDevOptionsCache
{
GENERATED_BODY()
UPROPERTY()
UObject* RandomBullshit;
UPROPERTY()
TArray<UObject*> AttributeSets;
UPROPERTY()