-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua Run File Doesnt Work #25
Comments
And also, how to call an UFunction from lua with parameters ? Thx |
Hi, LuaRunFile does not run code assets, it runs plain files from the filesystem. To run UFunction you need to register them in the LuaState using LuaValue as arguments |
Oh ok, but so, we cant "RunLuaFile" with a .lua in project ? |
Also, i removed some functions in my lua script but they seems to be always here |
You can have .lua files in the content directory but they are completely different from LuaCode Assets. Read: you cannot change the LuaCode asset and expect the .lua file will be changed accordingly, they serves different purposes (one allows after-builds modifications, the other will be hardcoded in the final binary). |
Oh ok, i see thank you, and like i said, i had functions (but i removed it, in the .lua) and the lua stack continue executing it, whats the problem ? I think lua memorized my functions |
It is in the previous answer :) you are changing the code asset instead of the lua files, or (but i doubt about it) you are expecting that just changing the content of the file will be enough for lua (you need to reparse/execute it, you can re-run LuaRunFile or LuaRunCodeAsset multiple times for the same LuaState) |
Oh ok sorry i didnt see ! I will check, thank you :) |
LuaRunCodeAsset doesnt resolve the problem |
Ok i figured out the "problem", i was calling a function that doesnt exist in my .lua file |
Hello, lua run file doesnt seem to work :
It say nil :/
The text was updated successfully, but these errors were encountered: