Hi,
I have a lot of prefab with accented character in name.
I’m importing them to inventory list.
If the name of file has “Ü” , then Unity can’t load the images or prefabs.
I don’t understand why, because everywhere else is correct this character.
using UnityEngine;
using System.Collections;
using System.Text.RegularExpressions;
using System.Text;
[System.Serializable]
public class Item {
public string itemName;
public int itemID;
public string itemDesc;
public Texture2D itemIcon;
public ItemType itemType;
public GameObject itemPrefab;
public enum ItemType {
Comfort,
Stark,
AlexStandard,
Targyalo,
PlusszTermekek,
Szekreny,
Szekek
}
public Item(string name, int id, string desc, ItemType type)
{
itemName = name;
itemID = id;
itemDesc = desc;
itemIcon = Resources.Load<Texture2D> ("Item Icons/" + name + "_ICON");
itemPrefab = Resources.Load ("Prefabs/"+name) as GameObject;
itemType = type;
}
public Item()
{
}
}