UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SkeletalMeshSocket.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4#pragma once
5
6#include "CoreMinimal.h"
8#include "UObject/Object.h"
10#include "SkeletalMeshSocket.generated.h"
11
12UCLASS(hidecategories=Object, hidecategories=Actor, BlueprintType, MinimalAPI)
14{
16
17public:
24 UPROPERTY(Category="Socket Parameters", VisibleAnywhere, BlueprintReadOnly)
25 FName SocketName;
26
27 UPROPERTY(Category="Socket Parameters", VisibleAnywhere, BlueprintReadOnly)
28 FName BoneName;
29
30 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Socket Parameters")
32
33 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Socket Parameters")
35
36 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Socket Parameters")
37 FVector RelativeScale = FVector::OneVector;
38
41 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Socket Parameters")
42 bool bForceAlwaysAnimated = true;
43
44#if WITH_EDITOR
46 UFUNCTION(BlueprintCallable, Category="Socket Parameters")
48#endif
49
50 UFUNCTION(BlueprintCallable, Category="Components|SkeletalMesh")
51 ENGINE_API FVector GetSocketLocation(const class USkeletalMeshComponent* SkelComp) const;
52
54 UFUNCTION(BlueprintCallable, Category="Components|SkeletalMesh")
55 ENGINE_API void InitializeSocketFromLocation(const class USkeletalMeshComponent* SkelComp, FVector WorldLocation, FVector WorldNormal);
56
58 ENGINE_API bool GetSocketMatrix(FMatrix& OutMatrix, const class USkeletalMeshComponent* SkelComp) const;
59
61 UFUNCTION(BlueprintCallable, Category="Socket Parameters")
62 ENGINE_API FTransform GetSocketLocalTransform() const;
63
64#if WITH_EDITOR
66 UFUNCTION(BlueprintCallable, Category="Socket Parameters")
68#endif
69
71 ENGINE_API FTransform GetSocketTransform( const class USkeletalMeshComponent* SkelComp ) const;
72
83 bool GetSocketMatrixWithOffset(FMatrix& OutMatrix, class USkeletalMeshComponent* SkelComp, const FVector& InOffset, const FRotator& InRotation) const;
84
95 bool GetSocketPositionWithOffset(FVector& OutPosition, class USkeletalMeshComponent* SkelComp, const FVector& InOffset, const FRotator& InRotation) const;
96
105 ENGINE_API bool AttachActor (class AActor* Actor, class USkeletalMeshComponent* SkelComp) const;
106
107 virtual void Serialize(FArchive& Ar) override;
108
109#if WITH_EDITOR
112 FSocketChangedEvent& OnPropertyChanged() { return ChangedEvent; }
113
114 //~ Begin UObject Interface
115 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
116 //~ End UObject Interface
117
118 // Utility function to copy socket
119 ENGINE_API void CopyFrom(const class USkeletalMeshSocket* OtherSocket);
120
121private:
123 FSocketChangedEvent ChangedEvent;
124
125#endif // WITH_EDITOR
126};
127
128
129
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_EVENT_TwoParams(OwningType, EventName, Param1Type, Param2Type)
Definition DelegateCombinations.h:60
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition Actor.h:257
Definition Archive.h:1208
Definition NameTypes.h:617
Definition UnrealType.h:174
Definition Object.h:95
Definition SkeletalMeshSocket.h:14
Definition SkeletalMesh.h:440
Definition UnrealType.h:6865