IM following a tutorial where he makes a simple menu. very straight forward, when you hit a certain key, the menu pop up. For him and Usually for me, he makes a serialized field of the UI var, then inside Unity, drags the UI canvas/images/temnplate/menu into this script. Now ive done this time and time again, with no issues, but this time, when trying to drag this particular gameobject That is basically a canvas of images creating this menu. It will not let me drag it in? It simply has a stop sign emblem basically saying it wont accept? I click the browse button next to it, only to see it says “None” From the list? Why the heck wont my script allow me to add this gameobject? Any help is appreciated, thanks.
The structure goes a such: within my hierarchy: gameObject Parrent Called “UI_Inventory”. Within that parent, we have the background which is basically just an image with transparent, the image of a few practice items, the container for the menu itself, etc. Alls is literally hardcoded right now. Meaning… They are just still images and texts that are not being fed any data yet.
Thats it. All im trying to do, is just simply get this menu/inventory canvas, to just pop open when hitting a certain key. But within my Player Script, within the inspector, the Serialized Field is there waiting to be added, but it just simply wont allow it? X’ed out/Grey’ed out…???
Here is my Code incase that matters?:
[SerializeField] private UI_Inventory uiInventory;
Pic Of Hierarchy:
Pic Of Inspector: WILL NOT ALLOW ME TO DRAG THE UI_INVENTORY onto the SerializedField.:
Welp apparently can only do 2. But ya, it wont let me drag it into my script??