File tree Expand file tree Collapse file tree 6 files changed +81
-2
lines changed
AssetDumper/Source/AssetDumper
Private/Toolkit/AssetTypes
Public/Toolkit/AssetTypes
AssetGenerator/Source/AssetGenerator
Private/Toolkit/AssetTypeGenerator
Public/Toolkit/AssetTypeGenerator Expand file tree Collapse file tree 6 files changed +81
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ public AssetDumper(ReadOnlyTargetRules Target) : base(Target)
3333 PrivateDependencyModuleNames . AddRange ( new [ ] {
3434 "PhysicsCore" ,
3535 "RHI" ,
36- "MediaAssets"
36+ "MediaAssets" ,
37+ "WwiseFileHandler" , "AkAudio"
3738 } ) ;
3839
3940 if ( Target . bBuildEditor ) {
Original file line number Diff line number Diff line change 1+ #include " Toolkit/AssetTypes/AkAudioEventAssetSerializer.h"
2+ #include " Toolkit/AssetDumping/SerializationContext.h"
3+ #include " Toolkit/AssetDumping/AssetTypeSerializerMacros.h"
4+ #include " Toolkit/ObjectHierarchySerializer.h"
5+ #include " AkAudioEvent.h"
6+
7+ void UAkAudioEventAssetSerializer::SerializeAsset (TSharedRef<FSerializationContext> Context) const
8+ {
9+ BEGIN_ASSET_SERIALIZATION (UAkAudioEvent)
10+ SERIALIZE_ASSET_OBJECT
11+ END_ASSET_SERIALIZATION
12+ }
13+
14+ FTopLevelAssetPath UAkAudioEventAssetSerializer::GetAssetClass () const
15+ {
16+ return FTopLevelAssetPath (UAkAudioEvent::StaticClass ());
17+ }
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include " CoreMinimal.h"
4+ #include " Toolkit/AssetDumping/AssetTypeSerializer.h"
5+ #include " AkAudioEventAssetSerializer.generated.h"
6+
7+ UCLASS (MinimalAPI)
8+ class UAkAudioEventAssetSerializer : public UAssetTypeSerializer {
9+ GENERATED_BODY ()
10+ public:
11+ virtual void SerializeAsset (TSharedRef<FSerializationContext> Context) const override ;
12+
13+ virtual FTopLevelAssetPath GetAssetClass () const override ;
14+ };
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ public AssetGenerator(ReadOnlyTargetRules Target) : base(Target)
3939 "PhysicsCore" ,
4040 "MediaAssets" ,
4141 "AudioEditor" ,
42- "GraphEditor"
42+ "GraphEditor" ,
43+ "WwiseFileHandler" , "AkAudio"
4344 } ) ;
4445
4546 PrivateDependencyModuleNames . Add ( "DeveloperSettings" ) ;
Original file line number Diff line number Diff line change 1+ #include " Toolkit/AssetTypeGenerator/AkAudioEventGenerator.h"
2+ #include " AkAudioEvent.h"
3+ #include " Toolkit/PropertySerializer.h"
4+ #include " Toolkit/AssetDumping/AssetTypeSerializerMacros.h"
5+
6+ void UAkAudioEventGenerator::PostInitializeAssetGenerator ()
7+ {
8+ UPropertySerializer* Serializer = GetPropertySerializer ();
9+
10+ // transient and changed every time material parameter collection is changed
11+ // DISABLE_SERIALIZATION(UMaterialParameterCollection, StateId);
12+ }
13+
14+ UClass* UAkAudioEventGenerator::GetAssetObjectClass () const
15+ {
16+ return UAkAudioEvent::StaticClass ();
17+ }
18+
19+ void UAkAudioEventGenerator::PopulateSimpleAssetWithData (UObject* Asset)
20+ {
21+ Super::PopulateSimpleAssetWithData (Asset);
22+ UAkAudioEvent* AkAudioEvent = CastChecked<UAkAudioEvent>(Asset);
23+
24+ AkAudioEvent->PostLoad ();
25+ }
26+
27+ FTopLevelAssetPath UAkAudioEventGenerator::GetAssetClass ()
28+ {
29+ return FTopLevelAssetPath (UAkAudioEvent::StaticClass ());
30+ }
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include " CoreMinimal.h"
4+ #include " Toolkit/AssetTypeGenerator/SimpleAssetGenerator.h"
5+ #include " AkAudioEventGenerator.generated.h"
6+
7+ UCLASS (MinimalAPI)
8+ class UAkAudioEventGenerator : public USimpleAssetGenerator {
9+ GENERATED_BODY ()
10+ protected:
11+ virtual void PostInitializeAssetGenerator () override ;
12+ virtual UClass* GetAssetObjectClass () const override ;
13+ virtual void PopulateSimpleAssetWithData (UObject* Asset) override ;
14+ public:
15+ virtual FTopLevelAssetPath GetAssetClass () override ;
16+ };
You can’t perform that action at this time.
0 commit comments