- Home /
Question by
cwperkins83 · Jan 24, 2016 at 04:23 PM ·
inspectorcustom-inspectorinventory systemitem
How to view variables from a script stored inside another script in Inspector
I'm creating an inventory system. I'm storing ItemData inside a different script for GameObject Items. Is there a way to view the variables from the stored ItemData inside the inspector?
public class Item : MonoBehaviour {
bool highlighted = false;
float pickupRange = 3;
Inventory player;
ItemData myData;
Comment
Best Answer
Answer by ShadyProductions · Jan 24, 2016 at 05:01 PM
[System.Serializable]
Put this infront of your class.
Your answer
![](https://koobas.hobune.stream/wayback/20220612061517im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Questions Regarding Images in Custom Inspector/Editor 1 Answer
Creating enum using a string array 3 Answers
Reorderable list of UnityEvents 2 Answers