Possible bug with Custom Lua Function Info?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

Possible bug with Custom Lua Function Info?

Post by Tentakero »

For some reason, I can't get a custom lua function info script to show up in the Lua wizard drop down menu.

I'm creating the scriptable object version found here under Create->Pixel Crushers->Dialogue System -> Custom Lua
https://www.pixelcrushers.com/dialogue_ ... ncTemplate

I currently have 5 custom lua scripts which are all working, but for some reason the 6th doesn't show up all the time. The only way I managed to get it to show up was by restarting Unity, which then ended up getting stuck at launch by failing to load the window layout.

I tracked the window layout bug to this known issue in unity 2020.1
https://issuetracker.unity3d.com/issues ... dow-layout

I'm thinking the issue might just be with 2020 but I wanted to bring it up just in case anyone else has run into the problem or if I'm doing something wrong when creating these lua info scripts?

Image
For reference, a working one is looking like this and there's nothing significantly different between the ones that are working and the new one that isn't. The only thing is that the new one takes in 4 string parameters but I doubt that's it right?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tony Li »

Hi,

Can you share a screenshot of the CustomLuaFunctionInfo inspector that defines the Lua function?
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tentakero »

Tony Li wrote: Mon Sep 28, 2020 8:43 pm Hi,

Can you share a screenshot of the CustomLuaFunctionInfo inspector that defines the Lua function?
This is the one that's not showing up. Actually, none of the new ones that I make now are showing up.

Image

And here's how the drop down looks. The one named TestName was the one that managed to show up after relaunching Unity and going through the UI loop bug that I linked up there.
Image
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tony Li »

Are they all in the same CustomLuaFunctionInfo asset or different assets? Is there a particular CustomLuaFunctionInfo asset that isn't showing its functions?
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tentakero »

They're all separate assets. I did try putting them all into one but it didn't seem to make a difference. It's really strange because any customlua asset I make now just won't show up and the process of making them was working fine up until yesterday. Didn't really change anything significant either within my project.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tony Li »

Are there any errors or warnings in the Console window? (Make sure you're not filtering out errors and warnings.)

Can you try backing up your project and updating to the latest version of 2020.1? I strongly suspect this is a Unity AssetDatabase issue in 2020.1.

BTW, if you need an immediate workaround, you can manually type those functions into your Conditions and Script fields. CustomLuaFunctionInfo assets are just a convenience feature to reduce typing.
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tentakero »

No errors in the console but yeah I think I'm going to keep doing it manually and try it again when unity patches that bug. I'll post what happens in this thread whenever I manage to get it working.

Thanks for the help!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tony Li »

I don't know definitively that it's a 2020.1 bug, but it's the most likely culprit since there are a bunch of AssetDatabase bugs that are still active.
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tentakero »

I confirmed that this is an engine bug. Updating from 2020.1.5 to 2020.1.6 appears to have solved the issue. I think it has something to do with that inspector bug messing things up but the ball is in Unity's court for now.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible bug with Custom Lua Function Info?

Post by Tony Li »

Thanks for the update!
Post Reply