- Home /
Using scripts out of my assets folder!
Hello! I searched a lot on google but couldn't find an option to use scrips that are outside my assets folder. So i need help, how to use variables wich are locaden in an script outside the assets folder? I know how to acces scripts in assets, with GetComponent and other methods, but here i don't:(
Or how to import and use assets after i release the game? Thanks in advance!
Answer by mikelortega · Apr 23, 2015 at 04:36 PM
You cannot use scripts outside the assets folder. Scripts must be in the assets folder so Unity can build them.
If you only want to load variables, you can open any kind of xml, ini or txt file outside the assets folder with, for example, XmlReader, XDocument or File.
To add levels or elements later on in your game, you can also check AsssetBundles.
Your answer
![](https://koobas.hobune.stream/wayback/20220613193847im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How To Refresh Resources Folder in Build? 1 Answer
Help, Reading a Json file (getting error KeyNotFounfExeption) 1 Answer
Object disappears on running 1 Answer
Importing A Bolt Flow 0 Answers