Announcement

Collapse
No announcement yet.

FStaticMeshLODResources.IndexBuffer.GetArrayView() fails in package build

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FStaticMeshLODResources.IndexBuffer.GetArrayView() fails in package build

    Hello,

    I have a system running that works well and looks great when PIE.

    However if I attempt to package the project my system crashes.

    It crashes because this line returns NULL:

    Code:
    AnalyseMesh::AnalyseMesh(
    	UStaticMesh *	meshToHandle)
    {
    	FStaticMeshLODResources& RenderMesh = meshToHandle->RenderData->LODResources[0];
    	FIndexArrayView RawIndices = RenderMesh.IndexBuffer.GetArrayView(); // Return NULL
    }
    I am finding that RawIndicies is coming back as NULL. I have based this code on \Engine\Source\Editor\UnrealEd\Private\Fbx\FBXMainExport.cpp

    I desperately need the triangle data in a packaged game.

    However the data appears to be available when playing in the editor. Is there a way to get the triangle data? Perhaps, in a worst case, add it to the object as part of the cook process?

    If I can't get the triangle data then the last 4 weeks of work will have been wasted!
    Last edited by PompeyPaul; 11-19-2014, 08:08 AM.

    #2
    Appears it's not just me: https://answers.unrealengine.com/que...tandalone.html

    Comment

    Working...
    X