diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonRendererComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonRendererComponent.h index 6b5698084..f32f49c2a 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonRendererComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonRendererComponent.h @@ -47,6 +47,7 @@ public: virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; + // Material Instance parents UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadOnly) UMaterialInterface* NormalBlendMaterial; @@ -59,6 +60,23 @@ public: UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadOnly) UMaterialInterface* ScreenBlendMaterial; + // Need to hold on to the dynamic instances, or the GC will kill us while updating them + UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) + TArray atlasNormalBlendMaterials; + TMap pageToNormalBlendMaterial; + + UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) + TArray atlasAdditiveBlendMaterials; + TMap pageToAdditiveBlendMaterial; + + UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) + TArray atlasMultiplyBlendMaterials; + TMap pageToMultiplyBlendMaterial; + + UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) + TArray atlasScreenBlendMaterials; + TMap pageToScreenBlendMaterial; + UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) float DepthOffset = 0.1f; @@ -68,9 +86,9 @@ public: UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) FLinearColor Color = FLinearColor(1, 1, 1, 1); - /** Whether to generate collision geometry for the skeleton, or not. */ - UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) - bool bCreateCollision; + /** Whether to generate collision geometry for the skeleton, or not. */ + UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadWrite) + bool bCreateCollision; virtual void FinishDestroy() override; @@ -79,23 +97,6 @@ protected: void Flush (int &Idx, TArray &Vertices, TArray &Indices, TArray &Uvs, TArray &Colors, TArray &Colors2, UMaterialInstanceDynamic* Material); - // Need to hold on to the dynamic instances, or the GC will kill us while updating them - UPROPERTY() - TArray atlasNormalBlendMaterials; - TMap pageToNormalBlendMaterial; - - UPROPERTY() - TArray atlasAdditiveBlendMaterials; - TMap pageToAdditiveBlendMaterial; - - UPROPERTY() - TArray atlasMultiplyBlendMaterials; - TMap pageToMultiplyBlendMaterial; - - UPROPERTY() - TArray atlasScreenBlendMaterials; - TMap pageToScreenBlendMaterial; - spine::Vector worldVertices; spine::SkeletonClipping clipper; };