Skip to content

No module found #332

@rivenblades

Description

@rivenblades

i have a simple luaTest.lua file that requires another simple point.lua file.
both are in same directory of unity( inside Assets)
it doesnt find the other file as a module(poin.lua)
luaTest.lua is:

package.path = './?.lua';
package.path = package.path .. 'D:\\Business\\BadBoy\\Assets\\luaTest.lua;';
require ('point');
print("Hello world")

point.lua is:

let point = {}
print("Skaseee")
return `point`

when i do

public string code;
Script script = new Script();
script.DoString(code);

it says ScriptRuntimeException: module 'point' not found
MoonSharp.Interpreter.Script.RequireModule (System.String modname, MoonSharp.Interpreter.Table globalContext) (at Assets/Plugins/MoonSharp/Interpreter/Script.cs:633)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions