Merge branch '4.1' into 4.2-beta

This commit is contained in:
Mario Zechner 2023-10-11 11:45:00 +02:00
commit 6241ce9f14
6 changed files with 10 additions and 14 deletions

View File

@ -43,7 +43,6 @@ void _spMeshAttachment_dispose(spAttachment *attachment) {
FREE(self->edges);
} else
_spAttachment_deinit(attachment);
if (self->sequence) FREE(self->sequence);
FREE(self);
}

View File

@ -32,19 +32,17 @@
#include "SpineAtlasAsset.h"
#include "SpineSkeletonDataAsset.h"
class FSpineAtlasAssetTypeActions : public FAssetTypeActions_Base
{
class FSpineAtlasAssetTypeActions : public FAssetTypeActions_Base {
public:
UClass* GetSupportedClass() const override { return USpineAtlasAsset::StaticClass(); };
UClass *GetSupportedClass() const override { return USpineAtlasAsset::StaticClass(); };
FText GetName() const override { return INVTEXT("Spine atlas asset"); };
FColor GetTypeColor() const override { return FColor::Red; };
uint32 GetCategories() override { return EAssetTypeCategories::Misc; };
};
class FSpineSkeletonDataAssetTypeActions : public FAssetTypeActions_Base
{
class FSpineSkeletonDataAssetTypeActions : public FAssetTypeActions_Base {
public:
UClass* GetSupportedClass() const override { return USpineSkeletonDataAsset::StaticClass(); };
UClass *GetSupportedClass() const override { return USpineSkeletonDataAsset::StaticClass(); };
FText GetName() const override { return INVTEXT("Spine data asset"); };
FColor GetTypeColor() const override { return FColor::Red; };
uint32 GetCategories() override { return EAssetTypeCategories::Misc; };

View File

@ -1,5 +1,5 @@
# spine-ue4
The spine-ue4 runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [Unreal Engine 4.21+](https://www.unrealengine.com/). spine-ue4 is based on [spine-cpp](../spine-cpp).
The spine-ue4 runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [Unreal Engine 4.27-5.2](https://www.unrealengine.com/). spine-ue4 is based on [spine-cpp](../spine-cpp).
## Licensing
@ -34,7 +34,7 @@ See the [Spine Runtimes documentation](http://esotericsoftware.com/spine-documen
## Example
### [Please see the spine-ue4 guide for full documentation](http://esotericsoftware.com/spine-ue4)
The Spine UE4 example works on all platforms supported by Unreal Engine. The samples require Unreal Engine 4.25+.
The Spine UE4 example works on all platforms supported by Unreal Engine. The samples require Unreal Engine 4.27-5.2.
1. Copy the `spine-cpp` folder from this repositories root directory to your `Plugins/SpinePlugin/Sources/SpinePlugin/Public/` directory. You can run the `setup.bat` or `setup.sh` scripts to accomplish this.
2. Open the SpineUE4.uproject file with Unreal Editor

View File

@ -970,8 +970,7 @@ namespace Spine.Unity {
atlasAsset.RequireTextureLoaded(this.mainTexture, ref loadedTexture, null);
if (loadedTexture)
this.baseTexture = loadedTexture;
}
else {
} else {
Texture[] textureItems = usedTextures.Items;
for (int i = 0, count = usedTextures.Count; i < count; ++i) {
Texture loadedTexture = null;

View File

@ -167,7 +167,7 @@ namespace Spine.Unity {
}
public override void LateUpdate () {
if (updateTiming == UpdateTiming.InLateUpdate && valid && translator != null && translator.Animator != null)
if (updateTiming == UpdateTiming.InLateUpdate && valid && translator != null && translator.Animator != null)
UpdateAnimation();
// instantiation can happen from Update() after this component, leading to a missing Update() call.
if (!wasUpdatedAfterInit) Update();

View File

@ -261,7 +261,7 @@ namespace Spine.Unity {
}
protected virtual Texture RequestLoadTexture (Material material, int materialIndex, int textureIndex,
System.Action<Texture> onTextureLoaded) {
System.Action<Texture> onTextureLoaded) {
PlaceholderTextureMapping[] placeholderTextures = placeholderMap[materialIndex].textures;
TargetReference targetReference = placeholderTextures[textureIndex].targetTextureReference;