Esempio n. 1
0
 /// <summary>
 /// Use this for adding Undo support for changes that are not serialized by Unity when Unity can't handle undoing the action
 /// </summary>
 /// <param name="targets"> The UnityEngine.Object targets which contain the members which are being modified. </param>
 /// <param name="memberInfo"> The LinkedMemberInfo for the members which are being modified. This cannot be null. </param>
 /// <param name="valueTo"> The value to which the members will be set. </param>
 /// <param name="menuItemText"> Message describing the undo. </param>
 /// <param name="registerCompleteObjectUndo"> Set to true if full object hierarchy should be serialized for the Undo. This is needed for undoing changes to array size fields to function properly. </param>
 /// <returns> True if should call EditorUtility.SetDirty after value has changed. </returns>
 public static bool RegisterUndoableAction(Object[] targets, [NotNull] LinkedMemberInfo memberInfo, object valueTo, [NotNull] string menuItemText, bool registerCompleteObjectUndo)
 {
     return(RegisterUndoableAction(targets, memberInfo, ArrayPool <object> .CreateWithContent(valueTo), menuItemText, registerCompleteObjectUndo));
 }