private void DeleteAttachedLWF(Movie parent, LWFContainer lwfContainer, bool destroy = true, bool deleteFromDetachedLWFs = true) { string attachName = lwfContainer.child.attachName; int attachDepth = lwfContainer.child.depth; parent.m_attachedLWFs.Remove(attachName); parent.m_attachedLWFList[attachDepth] = null; if (deleteFromDetachedLWFs) { parent.m_detachedLWFs.Remove(attachName); } parent.ShrinkAttachedLWFList(); if (destroy && lwfContainer.child.detachHandler != null) { lwfContainer.child.detachHandler(lwfContainer.child); lwfContainer.child.parent = null; lwfContainer.child.detachHandler = null; lwfContainer.child.attachName = null; lwfContainer.child.depth = -1; } }
private void DeleteAttachedLWF(Movie parent, LWFContainer lwfContainer, bool destroy = true, bool deleteFromDetachedLWFs = true) { string attachName = lwfContainer.child.attachName; int attachDepth = lwfContainer.child.depth; parent.m_attachedLWFs.Remove(attachName); parent.m_attachedLWFList[attachDepth] = null; if (deleteFromDetachedLWFs) parent.m_detachedLWFs.Remove(attachName); parent.ShrinkAttachedLWFList(); if (destroy && lwfContainer.child.detachHandler != null) { lwfContainer.child.detachHandler(lwfContainer.child); lwfContainer.child.parent = null; lwfContainer.child.detachHandler = null; lwfContainer.child.attachName = null; lwfContainer.child.depth = -1; } }