Trouble with Resources.Load

var myText: TextAsset = Resources.Load(“Test”, TextAsset);

I have made a file called Resources, a text file called Test is inside it, and whenever I run my game, it doesn’t seem to assign itself the filename (Test.txt)

I don’t want to do this manually cause I want to have different text-files.

What is the right way to do this

when you said file im assuming you meant folder. All resources need to be inside of a folder called Resources. In order to use them in game, you need to refer to them in code like this yourObject = Resources.Load("Test", typeof(ObjectType)) as ObjectType; im guessing you forgot the “as TextAsset” part of it