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

Method BreakPrefabLink

Source/Engine/Level/Actor.cpp:976–1002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

974}
975
976void Actor::BreakPrefabLink()
977{
978#if USE_EDITOR
979 if (_isPrefabRoot)
980 {
981 ScopeLock lock(PrefabManager::PrefabsReferencesLocker);
982 PrefabManager::PrefabsReferences[_prefabID].Remove(this);
983 }
984#endif
985
986 // Invalidate link
987 _prefabID = Guid::Empty;
988 _prefabObjectID = Guid::Empty;
989 _isPrefabRoot = 0;
990
991 // Do for scripts
992 for (int32 i = 0; i < Scripts.Count(); i++)
993 {
994 Scripts[i]->BreakPrefabLink();
995 }
996
997 // Do for children
998 for (int32 i = 0; i < Children.Count(); i++)
999 {
1000 Children[i]->BreakPrefabLink();
1001 }
1002}
1003
1004void Actor::Initialize()
1005{

Callers 5

LinkPrefabFunction · 0.45
FromBytesMethod · 0.45
ApplyAllInternalMethod · 0.45
DoBreakMethod · 0.45
BreakLinksMethod · 0.45

Calls 2

RemoveMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected