How to store the last 'typeof' slected in the hierarchy?

Hi there,

I’m working on an EditorWindow script which plays a uSequencer sequencer when a button is pressed. However, ideally I don’t want to specify the sequence manually, but just have it set to the last uSequencer sequencer that I’ve selected in the hierarchy. Similar to how the uSequencer window works, in fact.

Any ideas?

Cheers

You should give a look to the Selection class; Unity - Scripting API: Selection

It hold references to the currently selected object.

Hmmmm, not sure that’s going to do it - the way uSequencer behaves is that you can select a sequence in the hierarchy, and then even if you then select other things after that, when you open the uSequencer window it shows the data for the last sequence which was selected.