MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMaterial

Method GetMaterial

Source/Engine/Level/Actors/SplineModel.cpp:353–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353MaterialBase* SplineModel::GetMaterial(int32 entryIndex)
354{
355 if (Model)
356 Model->WaitForLoaded();
357 else
358 return nullptr;
359 CHECK_RETURN(entryIndex >= 0 && entryIndex < Entries.Count(), nullptr);
360 MaterialBase* material = Entries[entryIndex].Material.Get();
361 if (!material)
362 {
363 material = Model->MaterialSlots[entryIndex].Material.Get();
364 if (!material)
365 material = GPUDevice::Instance->GetDefaultDeformableMaterial();
366 }
367 return material;
368}
369
370ModelBase* SplineModel::GetModel()
371{

Callers 4

cacheStaticGeometryTreeFunction · 0.45
InitializeMethod · 0.45
RefreshMethod · 0.45

Calls 4

WaitForLoadedMethod · 0.80
CountMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected