Hello, after following a tutorial in Javascript about the use of GUI class and such, I decided to translate the code to C# since the tutorial doesn’t provide it.
My issue is with 4 variables of an Item class defined in the Menu.js/Menu.cs file
public var a_weapons : Item[];
public var a_armors : Item[];
public var a_accessories : Item[];
public var a_items : Item[];
In Javascript, they display perfectly in Unity’s Inspector after assigned to a gameobject, but that’s not the case with C#.:
public Item[] a_weapons;
public Item[] a_armors;
public Item[] a_accessories;
public Item[] a_items;
I have attached both files for further inspection, any help would be appreciated.
Thanks for the reply, I tested on a new empty project; only the scripts and a GameObject to test on.
With Menu and Item as separate files, and inheriting from MonoBehaviour, all the public variables are visible in the inspector, but changing the size of the Item array variables gives unusable elements.