Skip to content

Commit dc173a2

Browse files
daviduhmlokesku
authored andcommitted
Record changes to signal ID
1 parent 4a94d37 commit dc173a2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Assets/Scripts/Map/MapSignal.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Collections;
1010
using System.Collections.Generic;
1111
using UnityEngine;
12+
using UnityEditor;
1213
using System.Linq;
1314
using Simulator.Utilities;
1415
using Simulator.Controllable;
@@ -37,7 +38,13 @@ public class MapSignal : MapData, IControllable, IMapType
3738
public string id
3839
{
3940
get { return _id; }
40-
set { _id = value; }
41+
set
42+
{
43+
#if UNITY_EDITOR
44+
Undo.RecordObject(this, "Changed signal ID");
45+
#endif
46+
_id = value;
47+
}
4148
}
4249

4350
public string Key => UID;

0 commit comments

Comments
 (0)