Skip to content

Commit 4d760e0

Browse files
committed
Updated for Unity 5.2+ compatibility
1 parent 23cf3d4 commit 4d760e0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Console/Scripts/ConsoleGUI.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ private string LargestSubString(string in1, string in2) // takes two strings and
7777
private void MoveCursorToPos(int position)
7878
{
7979
TextEditor editor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl);
80+
#if UNITY_5_2 || UNITY_5_3 || UNITY_5_3_OR_NEWER
81+
editor.selectIndex = position;
82+
editor.cursorIndex = position;
83+
#else
84+
8085
editor.selectPos = position;
8186
editor.pos = position;
87+
#endif
8288
return;
8389
}
8490

0 commit comments

Comments
 (0)