Skip to content

Commit 3830b21

Browse files
committed
fix: setDirty allowed to happen in runtime
1 parent ba7421e commit 3830b21

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Scripts/Runtime/Utils/ObjectUtility.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ public static class ObjectUtility
44
{
55
public static void SetDirty(Object targetObject)
66
{
7+
#if UNITY_EDITOR
78
if (targetObject == null)
89
return;
9-
10-
if (Application.isPlaying)
11-
return;
12-
#if UNITY_EDITOR
10+
1311
UnityEditor.EditorUtility.SetDirty(targetObject);
1412
#endif
1513
}

0 commit comments

Comments
 (0)