- Home /
ArgumentException: control 1s position in group with only 1 control
I am aware of the existing questions with this (or similar) title. The first link in the answer on this one being the simplest one that I was able to follow and understand what the problem is.
Here's the thing, I get this error when I drag my custom UI component from my project window into the inspector:
ArgumentException: Getting control 1's position in a group with only 1 controls when doing
DragPerform
Aborting
With this code and no custom inspector:
public class LocalizableText : UnityEngine.UI.Text {
}
My use-case has properties, methods, and a custom inspector, but that is a MCVE, it is sufficient to cause the error to occur.
Just faced the same problem trying to create localized text in Unity 4.6 This is strange that just extending UnityEngine.UI.Text results the error. But there is quite interesting fact that extending UI.Button or UI.Image is ok. Unity 5 gave the same error
I suspect its a bug on Unity's end. At least the error only comes up when dragging the script component into the inspector panel. Every thing else is fine.
Firstly I thought that text doestn't render because of this error. But then I realised that this is white text on white background :D
Does your component contain any public variable of a type that has a custom property-drawer?
As shown, I can recreate the error with an empty class. In that case: no.
That class is not actually empty of stuff to draw in it's editor. Note: it is derived from Text, not $$anonymous$$onobehavior. Same behavior if you change that?
Your answer
Follow this Question
Related Questions
Help with GUILayout and tooltip(C#) 1 Answer
TextMeshPro text blurry when edited through script 1 Answer
How to make a simple gui list 0 Answers
Make GUILayout horizontal first, then vertical? (C#) 3 Answers
Simple text GUI 2 Answers