I am using director class for scene transitions and i need to use the variable in a class in another class. So how can i call it?
local a= require "welcome"
variableName is text display object in welcome class
print(a.variableName.text)
However i get nil.
Could you help me out? Thanks
Make the variable a property of the returned table:
Then you can reference it:
OR
If you want to pass variables between the screens in Rauber’s Director Class, you can:
In your screen, make the new function accept the parameters:
OR
Put _G in front of your variable
Then you can reference it in another class