Search Unity

Attempt to insert 9Slice RenderData twice warning in erroneous places

Discussion in 'Scripting' started by Fariel, Jul 15, 2018.

  1. Fariel

    Fariel

    Joined:
    Feb 9, 2013
    Posts:
    29
    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.
    Code (CSharp):
    1.      [SerializeField]
    2.      string folderToLoadFrom = "hats";
    3.      // Use this for initialization
    4.      void Start () {
    5.          GetComponent<TextMeshProUGUI>().text = Resources.LoadAll(folderToLoadFrom + "/").Length.ToString();
    6.      }
    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?
     
  2. cephalo2

    cephalo2

    Joined:
    Feb 25, 2016
    Posts:
    263
    I'm getting this too. Never got it before. It must have something to do with a recent update. I get it when I try to instantiate a certain GameObject.

    EDIT: This seems to be a problem only in the edtor in 2018.3.1f1
     
    Last edited: Jan 24, 2019