- Home /
Question by
Fariel · Jul 15, 2018 at 06:52 PM ·
gameobjectresourcesspriterendererwarningwarnings
Attempt to insert 9Slice RenderData twice warning in erroneous places
I have a script that counts the number of items in a resource folder and gives that number to a TextMeshPro text field. That's all it does.
[SerializeField]
string folderToLoadFrom = "hats";
// Use this for initialization
void Start () {
GetComponent<TextMeshProUGUI>().text = Resources.LoadAll(folderToLoadFrom + "/").Length.ToString();
}
For whatever reason this throws a warning: Attempt to insert 9Slice RenderData twice.
This isn't the only place I get this warning popping up. I also get it when I add a SpriteRenderer component to a gameobject that is created via script. No idea why it's showing up or what it even means.
Any help?
Comment