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

Method CreateCsgModel

Source/Engine/Level/Scene/Scene.cpp:217–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void Scene::CreateCsgModel()
218{
219 // Create model
220 auto result = New<StaticModel>();
221 result->SetStaticFlags(StaticFlags::FullyStatic);
222 result->SetName(String(CSG_MODEL_NAME));
223 result->Model = CSGData.Model;
224 result->HideFlags |= HideFlags::DontSelect;
225
226 // Link it
227 if (IsDuringPlay())
228 {
229 result->SetParent(this, false);
230 }
231 else
232 {
233 result->_parent = this;
234 result->_scene = this;
235 Children.Add(result);
236 result->CreateManaged();
237 }
238}
239
240void Scene::OnCsgCollisionDataChanged()
241{

Callers

nothing calls this directly

Calls 6

SetStaticFlagsMethod · 0.80
StringClass · 0.50
SetNameMethod · 0.45
SetParentMethod · 0.45
AddMethod · 0.45
CreateManagedMethod · 0.45

Tested by

no test coverage detected