private void DeleteAttachedMovie(Movie parent, Movie movie, bool destroy = true, bool deleteFromDetachedMovies = true) { string attachName = movie.attachName; int attachDepth = movie.depth; parent.m_attachedMovies.Remove(attachName); parent.m_attachedMovieList[attachDepth] = null; if (deleteFromDetachedMovies) { parent.m_detachedMovies.Remove(attachName); } parent.ShrinkAttachedMovieList(); if (destroy) { movie.Destroy(); } }
private void DeleteAttachedMovie(Movie parent, Movie movie, bool destroy = true, bool deleteFromDetachedMovies = true) { string attachName = movie.attachName; int attachDepth = movie.depth; parent.m_attachedMovies.Remove(attachName); parent.m_attachedMovieList[attachDepth] = null; if (deleteFromDetachedMovies) parent.m_detachedMovies.Remove(attachName); parent.ShrinkAttachedMovieList(); if (destroy) movie.Destroy(); }