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.
Is there any reason why this may be happening? And also what can we do to work around this? Many thanks in advance!
LoadLevel Sequencer Command not working as expected
Re: LoadLevel Sequencer Command not working as expected
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:
to:
where MyNamespace is your namespace.
If your script isn't in a namespace, change it to this:
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>();
Code: Select all
var levelManager = FindObjectOfType<MyNamespace.LevelManager>();
If your script isn't in a namespace, change it to this:
Code: Select all
var levelManager = FindObjectOfType<global::LevelManager>();