Open EthanWang1108 opened 2 years ago
先确认自己在unity C# generation里面加了lua没有,如果没加就加上然后重新生成项目 sln
操作之后可以跳转定义、显示代码提示了。但是对于package和工程里面都有的文件,他默认跳转的还是package里面的,这个有办法解决么?
跳转会以定义---@class的优先,
我新建了测试脚本
local TestLua = {}
function TestLua:Init()
ScrollGrid:Init()
end
return TestLua
把工程内的脚本加了---@class注释
---@class ScrollGrid
ScrollGrid = {}
但是跳转后还是跳到了package里面的脚本里,从任一的ScrollGrid脚本中点击跳转可以识别到工程里和pakcage里的引用,我是不是应该在rider里面想办法把生成的.csproj文件忽略一下?
或许可以在rider的编辑器设置里面忽略一部分lua文件
rider设置中忽略文件夹完美解决了问题,现在也不需要在每个上面标注---@class了,十分感谢!
Environment(环境)
What are the steps to reproduce this issue?(重现步骤?)
What happens?(出现什么问题?)
What were you expecting to happen?(期望?)
正确跳转定义,显示代码提示
Any logs, error output, etc?(有没有什么log, error输出?)
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Any other comments?(其它说明)
感谢大佬!