LoadLevel Sequencer Command not working as expected

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
BaddyDan
Posts: 14
Joined: Tue May 05, 2015 2:52 pm

LoadLevel Sequencer Command not working as expected

Post by BaddyDan »

Hello,

I am trying to create a custom sequencer command with my own LevelManager For some reason, I am unable to access my LevelManager's public functions, as demonstrated below.
Capture.JPG
Capture.JPG (37.01 KiB) Viewed 639 times
Is there any reason why this may be happening? And also what can we do to work around this? Many thanks in advance!
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: LoadLevel Sequencer Command not working as expected

Post by Tony Li »

Hi,

The Dialogue System also defines a "LevelManager" class. You just need to specify which one you're referring to.

If your LevelManager script is defined in a namespace, try changing:

Code: Select all

var levelManager = FindObjectOfType<LevelManager>();
to:

Code: Select all

var levelManager = FindObjectOfType<MyNamespace.LevelManager>();
where MyNamespace is your namespace.

If your script isn't in a namespace, change it to this:

Code: Select all

var levelManager = FindObjectOfType<global::LevelManager>();
Post Reply