对于函数参数的out类型参数,在lua的脚本中可以使用nil匹配函数输入参数

如:ColorUtility

Lua中使用ColorUtility.TryParseHtmlString获取out参数

 

lua中想获取out color可以这么写

local res, color = UnityEngine.ColorUtility.TryParseHtmlString("#DF0F08", nil)  --out参数位置用nil代替,color放在前面第二个位置接收out返回来的参数

 

相关文章:

  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2021-07-25
  • 2021-05-26
  • 2022-12-23
  • 2021-11-20
  • 2021-06-23
猜你喜欢
  • 2022-12-23
  • 2021-04-13
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案