Load file name form Resources folder with special characters

Hello,

I have a lot of file names with special characters.

cheminée.png
café.png
forêt.png

Is it possible to load the image file from the ressource folder using the exact file name with special characters?

Like this ?

Resources.Load<Sprite> ("images/café");

Thanks.

Yes it is possible (Oui c’est possible). Special Characters works in file name. If you wanna load your file as Sprite, you need to set the texture to Sprite in the TextureImporter of Unity. And your line of code should work.

If you don’t want to set your texture to Sprite, you can create a Sprite from a texture like this

	Texture2D _image;
	Sprite _sprite;

	private void Start()
	{
		_image = Resources.Load<Texture2D>("café"); //Loading your texture
		_sprite = Sprite.Create(_image,new Rect(0,0,0,0),Vector2.zero); //Creating the sprite with your loaded texture
	}