Skip to content

Commit

Permalink
added ReceiveOnStaticMeshComponentCreated and ReceiveOnSkeletalMeshCo…
Browse files Browse the repository at this point in the history
…mponentCreated
  • Loading branch information
rdeioris committed Nov 12, 2024
1 parent 2cd14a6 commit 328d2d1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/glTFRuntime/Private/glTFRuntimeAssetActorAsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void AglTFRuntimeAssetActorAsync::ProcessNode(USceneComponent* NodeParentCompone
AddInstanceComponent(StaticMeshComponent);
MeshesToLoad.Add(StaticMeshComponent, Node);
NewComponent = StaticMeshComponent;
ReceiveOnStaticMeshComponentCreated(StaticMeshComponent, Node);
}
else
{
Expand All @@ -102,6 +103,7 @@ void AglTFRuntimeAssetActorAsync::ProcessNode(USceneComponent* NodeParentCompone
AddInstanceComponent(SkeletalMeshComponent);
MeshesToLoad.Add(SkeletalMeshComponent, Node);
NewComponent = SkeletalMeshComponent;
ReceiveOnSkeletalMeshComponentCreated(SkeletalMeshComponent, Node);
}
}

Expand Down Expand Up @@ -292,4 +294,14 @@ void AglTFRuntimeAssetActorAsync::ReceiveOnNodeProcessed_Implementation(const in
FglTFRuntimeStaticMeshConfig AglTFRuntimeAssetActorAsync::OverrideStaticMeshConfig_Implementation(const int32 NodeIndex, UStaticMeshComponent* NodeStaticMeshComponent)
{
return StaticMeshConfig;
}

void AglTFRuntimeAssetActorAsync::ReceiveOnStaticMeshComponentCreated_Implementation(UStaticMeshComponent* StaticMeshComponent, const FglTFRuntimeNode& Node)
{

}

void AglTFRuntimeAssetActorAsync::ReceiveOnSkeletalMeshComponentCreated_Implementation(USkeletalMeshComponent* SkeletalMeshComponent, const FglTFRuntimeNode& Node)
{

}
6 changes: 6 additions & 0 deletions Source/glTFRuntime/Public/glTFRuntimeAssetActorAsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ class GLTFRUNTIME_API AglTFRuntimeAssetActorAsync : public AActor
UFUNCTION(BlueprintNativeEvent, Category = "glTFRuntime", meta = (DisplayName = "On Node Processed"))
void ReceiveOnNodeProcessed(const int32 NodeIndex, USceneComponent* NodeSceneComponent);

UFUNCTION(BlueprintNativeEvent, Category = "glTFRuntime", meta = (DisplayName = "On StaticMeshComponent Created"))
void ReceiveOnStaticMeshComponentCreated(UStaticMeshComponent* StaticMeshComponent, const FglTFRuntimeNode& Node);

UFUNCTION(BlueprintNativeEvent, Category = "glTFRuntime", meta = (DisplayName = "On SkeletalMeshComponent Created"))
void ReceiveOnSkeletalMeshComponentCreated(USkeletalMeshComponent* SkeletalMeshComponent, const FglTFRuntimeNode& Node);

UFUNCTION(BlueprintNativeEvent, Category = "glTFRuntime", meta = (DisplayName = "Override StaticMeshConfig"))
FglTFRuntimeStaticMeshConfig OverrideStaticMeshConfig(const int32 NodeIndex, UStaticMeshComponent* NodeStaticMeshComponent);

Expand Down

0 comments on commit 328d2d1

Please sign in to comment.