Skip to content

Commit 8c80ee3

Browse files
Fixed multi select issue with Referenced types
1 parent f7c6c69 commit 8c80ee3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Runtime/Attributes/Referenced.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ public override void OnGUI (UnityEngine.Rect position, UnityEditor.SerializedPro
1313
UnityEditor.EditorGUI.PropertyField (position, serializedProperty, label, false);
1414
UnityEditor.EditorGUI.EndDisabledGroup ();
1515

16+
// Don't allow Self Assigning when the editor is playing
1617
if (UnityEngine.Application.isPlaying == true)
1718
return;
19+
20+
// Don't allow Self Assigning when more than one gameObject is selected
21+
if (UnityEditor.Selection.gameObjects.Length != 1)
22+
return;
1823

1924
var _flattenObjectNameRegex = new System.Text.RegularExpressions.Regex ("[^a-zA-Z0-9]");
2025
var _matchComponentNameRegex = new System.Text.RegularExpressions.Regex (@"PPtr<\$(.*?)>");

0 commit comments

Comments
 (0)