- Home /
Undo.RecordObjects is not working on 2018.3???
Hello and good day.
I got a problem trying to use the Undo.RecordObjects method on Unity 2018.3.x, this method works perfectly on Unity 2017.x, so, what is missing or there's any change about using it on the new version?.
Cheers.
It's just the method using this as arguments: Selection.gameObjects, "Old Objects".
So... are you trying to record all selected gameObjects? to later (if changed) undo them? Or if your trying to save the 'Old objects', store them in a List<> to later access them:
List<GameObject> oldObjects = new List<GameObject>(Selection.gameObjects);
In a custom editor if you are trying to save the modified variables using RecordObject():
public override void OnInspectorGUI(){
myScript script = (myScript)target;
Undo.RecordObject(script, "");
}
I'm not trying to store the selection, what I'm trying it's to undo an action made inside the editor, what I don't understand it's why this method works perfectly in versions previous to 2018.x and now doesn't, and by the way, the "Old Objects" it's just the name for the undo recorded step.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Script generation. 1 Answer
Move Editor Button 1 Answer
[solved]Using WWW instead of resources.load causes hang 1 Answer