Referencing variables OUTSIDE of dialogue inspector

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hardballdev
Posts: 1
Joined: Wed Dec 29, 2021 6:16 am

Referencing variables OUTSIDE of dialogue inspector

Post 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.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Referencing variables OUTSIDE of dialogue inspector

Post 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.
Post Reply