mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ue4] Closes #1993, don't generate collision meshes in editor.
This commit is contained in:
parent
edea4bef94
commit
614b2749f7
@ -69,4 +69,5 @@ r.DefaultFeature.AmbientOcclusionStaticFraction=False
|
||||
r.DefaultFeature.AutoExposure=False
|
||||
r.UsePreExposure=False
|
||||
r.DefaultFeature.MotionBlur=False
|
||||
r.TextureStreaming=False
|
||||
|
||||
|
||||
@ -157,7 +157,15 @@ void USpineSkeletonRendererComponent::Flush(int &Idx, TArray<FVector> &Vertices,
|
||||
if (Vertices.Num() == 0) return;
|
||||
SetMaterial(Idx, Material);
|
||||
|
||||
CreateMeshSection(Idx, Vertices, Indices, Normals, Uvs, Colors, TArray<FProcMeshTangent>(), bCreateCollision);
|
||||
bool bShouldCreateCollision = false;
|
||||
if (bCreateCollision) {
|
||||
UWorld* world = GetWorld();
|
||||
if (world && world->IsGameWorld()) {
|
||||
bShouldCreateCollision = true;
|
||||
}
|
||||
}
|
||||
|
||||
CreateMeshSection(Idx, Vertices, Indices, Normals, Uvs, Colors, TArray<FProcMeshTangent>(), bShouldCreateCollision);
|
||||
|
||||
Vertices.SetNum(0);
|
||||
Indices.SetNum(0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user