Skip to content

Commit 86889fe

Browse files
committed
Ignore tiling while in a prefab stage
1 parent 643d5b4 commit 86889fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Runtime/AutoTile.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#if UNITY_EDITOR
1+
#if UNITY_EDITOR
22
using UnityEditor;
3+
using UnityEditor.Experimental.SceneManagement;
34
#endif
45
using UnityEngine;
56

@@ -138,7 +139,7 @@ private void LateUpdate()
138139
public void Tile()
139140
{
140141
#if UNITY_EDITOR
141-
if (PrefabUtility.IsPartOfPrefabAsset(this)) {
142+
if (PrefabUtility.IsPartOfPrefabAsset(this) || PrefabStageUtility.GetCurrentPrefabStage() != null) {
142143
return;
143144
}
144145
#endif

0 commit comments

Comments
 (0)