Search Unity

Array in Instance Object is empty

Discussion in 'Editor & General Support' started by Imperatoss, Aug 24, 2019.

  1. Imperatoss

    Imperatoss

    Joined:
    Mar 24, 2018
    Posts:
    51
    Hi, i create a static instance of a public class. Its a Component of a GameObject.
    It has an Array. Now if i add an Object to the Array, i can access it via Class.instance.array[x], but inside the class i also have to use Class.instance.array[x] and i cant use just array[x]. Thats okay so far.
    What i would like is to see the Array in the Inspector, it has Objects but in the Inspector the Array appears completly empty.
     
  2. Do not use static variables if you want to see them in the inspector.