There is a documentation or any info what are the differences if I want run the game from editor or standalone builds?
I have a raycast code which works perfectly in Editor builds (DebugGame Editor and Development Editor) but crashes in modes without editor.
example:
const auto* Actor = RV_Hit.GetActor();
UStaticMeshComponent* HitStaticMeshComponent = Cast<UStaticMeshComponent>(RV_Hit.Component.Get());
if (HitStaticMeshComponent)
{
UStaticMesh* StaticMesh = HitStaticMeshComponent->StaticMesh;
FStaticMeshLODResources& LODModel = StaticMesh->RenderData->LODResources[0];
FIndexArrayView Indices = LODModel.IndexBuffer.GetArrayView();
this is a raycast/hit check code fragment.
Indices is correct in editor modes, but NULL in standalone modes, therefore crashes in next lines where I want access it.
If you manage to find some documentation do pass that along. Because we have ran into many issues where things work perfectly in editor and do not in standalone. Wait till you start running into issues where things work perfectly in the editor and standalone but do not work perfectly when packaged up for release.
Seems like there is alot of inconsistenecy between what you get in the editor and what the final packaged product ends up doing.
can be a difference in serialization for indexbuffer between editor and standalone code ?
there is a bNeedsCPUAccess boolean which showed by the tooltip of GetArrayView
which used by the Serialize method of buffer…
FIndexBuffer {IndexBufferRHI={Reference=0x000000000f8405d0 <Information not available, no symbols loaded for UE4Editor-D3D11RHI.dll> } } FIndexBuffer
From what I just went through, it seems like BeginPlay inside the editor viewport has earlier access to resources than even new window PIE.
Therefore some things need a timeout to be ready (like access to the Viewport size).