- Home /
Problem is not reproducible or outdated
Access List from another script
How do I access a list from another script?
I can't do it like I access other variables. Because if I do, I get an error.
you'd have to POST YOUR CODE, and then many people will be happy to help you. Start a new question and include your code.
USE the code formatting button when you do so
ALSO do not post TOO $$anonymous$$UCH code, just the relevant code
See now, I didn't ask for a problem in my script. I asked how to access a list from another script. If this is possible to do as straight forward as accessing variables, just say it. If not, how do you access a list?
You access a List
exactly as you access any other variable from another script.
Don't forget it should be marked public
example
public List<string> words;
the in the other script
int c = thatClass.words.Count;
it's that simple. If it's not working, you have a bug, you'd have to post your code in a new question to seek help