/// <summary> /// Returns a deep copy of a QuestSubasset list. /// </summary> public static List <T> CloneList <T>(List <T> original) where T : QuestSubasset { if (original == null) { return(null); } var copy = ScriptableObjectUtility.CloneList <T>(original); for (int i = 0; i < original.Count; i++) { if (original[i] != null) { original[i].CloneSubassetsInto(copy[i]); } else { if (Debug.isDebugBuild) { Debug.LogWarning("QuestMachine: QuestSubasset.CloneList<" + typeof(T).Name + ">: Element " + i + " is null."); } } } return(copy); }