Hello, I’m trying to insantiate a sprite object , that is in the “resources/TurnAvatar/” folder with this line:
GameObject avatar = Instantiate(Resources.Load(“TurnAvatar/” + name),TurnInfo.transform.position, Quaternion.identity)as GameObject;
the “name” var contains the name of the wanted sprite in the directory (in this case :“Knight”).
but i get this error message that I don’t quite get :
Instantiating a non-readable ‘Knight’ texture is not allowed! Please mark the texture readable in the inspector or don’t instantiate it.
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)