Page 1 of 1

Rare editor bug

Posted: Thu Jul 21, 2016 2:39 am
by markov
Hi. Just encountered a bug:
In the method DialogueSystemController.OnEndConversation you invoke

Code: Select all

RestoreOriginalUI();
And it must do nothing if nobody override UI (by using OverrideUIBase for instance), because

Code: Select all

originalDisplaySettings = null.
BUT if I select DialogueSystemController's game object when inspector is in EDITOR mode, originalDisplaySettings became serialized by Unity and even if it was null it becomes not null because DisplaySettings class marked as serializable.
And then code restores default DisplaySettings which is very bad.

Please, mark originalDisplaySettings with [HideInInspector], the thing is very rare and someone car run into it only in editor. But coder may spend hours (as me) to resolve its consequences.

Re: Rare editor bug

Posted: Thu Jul 21, 2016 8:38 am
by Tony Li
This you for reporting this bug. I'll fix it and post a patch. I'm sorry about the trouble it caused.