ApplyUndoRedoDiff() public method

public ApplyUndoRedoDiff ( object diff ) : object
diff object
return object
        ObjectWrapperUndoRedoChange ApplyDiff(string id, object diff)
        {
//			Console.WriteLine ("** APPLYING DIFF: uid:" + id);
//			PrintPatch (diff);

            ObjectWrapper ww = rootObject.FindObjectByUndoId(id);

            if (ww == null)
            {
                Console.WriteLine("Object with undo id '{0}' not found", id);
                return(null);
            }

            object reverseDiff = ww.ApplyUndoRedoDiff(diff);

            if (reverseDiff != null)
            {
//				Console.WriteLine ("** REVERSE DIFF:");
//				PrintPatch (reverseDiff);

                ObjectWrapperUndoRedoChange change = new ObjectWrapperUndoRedoChange(this, id, reverseDiff);
                return(change);
            }
            else
            {
                return(null);
            }
        }