If we already have a use case for what to do if selectedDialogue is null why can’t we just cast Selection.activeObject as Dialogue directly into selectedDialogue? The way it’s done in the lecture is by casting it to a new variable called newDialogue and then checking. But then doesn’t the check in OnGUI() become redundant?
I’m just curious, is it like bad practice or something? It works fine when I tried it. Is it less performant?