浏览代码

Fixed up build for UE 4.20 preview 5. Packaging compiler flags are more strict than editor compiler flags...

badlogic 7 年之前
父节点
当前提交
b0c88b2322

二进制
spine-ue4/Content/Test/Blueprints/TwoColor_Blueprint.uasset


+ 2 - 2
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp

@@ -206,7 +206,7 @@ void SSpineWidget::Flush(int32 LayerId, FSlateWindowElementList& OutDrawElements
 	float width = AllottedGeometry.GetAbsoluteSize().X;
 	float height = AllottedGeometry.GetAbsoluteSize().Y;
 
-	for (size_t i = 0; i < Vertices.Num(); i++) {
+	for (size_t i = 0; i < (size_t)Vertices.Num(); i++) {
 		setVertex(&vertexData[i], Vertices[i].X, Vertices[i].Y, Uvs[i].X, Uvs[i].Y, Colors[i], offset);
 	}
 
@@ -245,7 +245,7 @@ void SSpineWidget::UpdateMesh(int32 LayerId, FSlateWindowElementList& OutDrawEle
 	float depthOffset = 0;
 	unsigned short quadIndices[] = { 0, 1, 2, 0, 2, 3 };
 
-	for (int i = 0; i < Skeleton->getSlots().size(); ++i) {
+	for (int i = 0; i < (int)Skeleton->getSlots().size(); ++i) {
 		Vector<float> &attachmentVertices = worldVertices;
 		unsigned short* attachmentIndices = nullptr;
 		int numVertices;

+ 1 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineAtlasAsset.cpp

@@ -107,7 +107,7 @@ Atlas* USpineAtlasAsset::GetAtlas (bool ForceReload) {
 		Vector<AtlasPage*> &pages = atlas->getPages();
 		for (size_t i = 0, n = pages.size(), j = 0; i < n; i++) {
 			AtlasPage* page = pages[i];
-			if (atlasPages.Num() > 0 && atlasPages.Num() > i)
+			if (atlasPages.Num() > 0 && atlasPages.Num() > (int32)i)
 				page->setRendererObject(atlasPages[j++]);
 		}
 	}

+ 1 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp

@@ -195,7 +195,7 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton* Skeleton) {
 	float depthOffset = 0;
 	unsigned short quadIndices[] = { 0, 1, 2, 0, 2, 3 };
 
-	for (int i = 0; i < Skeleton->getSlots().size(); ++i) {
+	for (size_t i = 0; i < Skeleton->getSlots().size(); ++i) {
 		Vector<float> &attachmentVertices = worldVertices;
 		unsigned short* attachmentIndices = nullptr;
 		int numVertices;

+ 2 - 2
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/SpinePlugin.Build.cs

@@ -9,9 +9,9 @@ namespace UnrealBuildTool.Rules
 			PublicIncludePaths.AddRange(new string[] { "SpinePlugin/Public", "SpinePlugin/Public/spine-cpp/include" });
             PrivateIncludePaths.AddRange(new string[] { "SpinePlugin/Private", "SpinePlugin/Public/spine-cpp/include" });
             PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "ShaderCore", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });
-			Definitions.Add("SPINE_UE4");
+			// Definitions.Add("SPINE_UE4");
 			// In Unreal 4.20+, comment the above line, uncomment the below line
-			// PublicDefinitions.Add("SPINE_UE4");
+			PublicDefinitions.Add("SPINE_UE4");
 		}
 	}
 }