mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[ue4] Added Color property to SkeletonRendererComponent. The value of that property will be set on the underlying spSkeleton->color and allows tinting of the skeleton instance.
This commit is contained in:
parent
ac3201afca
commit
6d9dcaeb92
@ -71,6 +71,8 @@ void USpineSkeletonRendererComponent::TickComponent (float DeltaTime, ELevelTick
|
||||
USpineSkeletonComponent* skeleton = Cast<USpineSkeletonComponent>(owner->GetComponentByClass(skeletonClass));
|
||||
|
||||
if (skeleton && !skeleton->IsBeingDestroyed() && skeleton->GetSkeleton() && skeleton->Atlas) {
|
||||
spColor_setFromFloats(&skeleton->GetSkeleton()->color, Color.R, Color.G, Color.B, Color.A);
|
||||
|
||||
if (atlasNormalBlendMaterials.Num() != skeleton->Atlas->atlasPages.Num()) {
|
||||
atlasNormalBlendMaterials.SetNum(0);
|
||||
pageToNormalBlendMaterial.Empty();
|
||||
|
||||
@ -64,6 +64,9 @@ public:
|
||||
|
||||
UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite)
|
||||
FName TextureParameterName;
|
||||
|
||||
UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite)
|
||||
FLinearColor Color = FLinearColor(1, 1, 1, 1);
|
||||
|
||||
protected:
|
||||
void UpdateMesh (spSkeleton* Skeleton);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user