Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Unity3D Error: CS0308

$
0
0
Hey i need help here is error: "Assets/Scripts/Item.cs(29,38): error CS0308: The non-generic method `UnityEngine.Resources.Load(string)' cannot be used with the type arguments" and here is a script: `using UnityEngine; using System.Collections; using System.Collections.Generic; [System.Serializable] public class Item { public string itemName; public int itemID; public string itemDescription; public Texture2D itemIcon; public int itemPower; public int itemSpeed; public ItemType itemType; public enum ItemType { Weapon, Consumable, Quest } public Item(string name, int id, string description, int power, int speed, ItemType type) { itemName = name; itemID = id; itemDescription = description; itemPower = power; itemIcon = Resources.Load("Resources/" + name); itemSpeed = speed; itemType = type; } public Item() { } }`

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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