Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

`Inventory' does not contain a definition for `Add'

$
0
0
Pls Does anyone help me? Assets/Script/Inventory.cs(13,27): error CS0117: `Inventory' does not contain a definition for `Add' Script : using System.Collections; using UnityEngine; using System.Collections.Generic; public class Inventory : MonoBehaviour { public List inventory = new List(); private Item_Database database; // Use this for initialization void Start () { database = GameObject.FindGameObjectsWithTag("Item Database");GetComponent(); inventory.Add(database.items[0]); Inventory.Add(database.items[1]); } // Update is called once per frame void Update () { } void OnGUI () { for(int i = 0;i < inventory.Count; i++){ GUI.Label(new Rect(10,10,200,50),inventory[i].ItemName); } } }

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>