Page 1 of 1

Referencing variables OUTSIDE of dialogue inspector

Posted: Wed Dec 29, 2021 6:19 am
by hardballdev
I was wondering if I'm able to pull a variable such as a scriptable object which isn't placed inside the dialogue system inspector.

I only need it to pull the current scriptable object's name and *int* amount at the moment.

Re: Referencing variables OUTSIDE of dialogue inspector

Posted: Wed Dec 29, 2021 7:53 am
by Tony Li
Hi,

Yes. Write a regular C# method(s) to access your variable. Then register the C# method(s) with Lua. Once registered, you can use the method(s) in your dialogue entries' Conditions and Script fields.