-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show autosave configure notifcation after first typing in play mode #1263
Conversation
…irst typing in playmode
MainThreadDispatcher.Instance.Queue(() => | ||
{ | ||
|
||
var tab = UnityUtils.UnityVersion >= new Version(2018, 2) ? "_General" : "Rider"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding try-catch-log may be good idea here.
if (!lifetimeDefinition.isAlive) | ||
return | ||
|
||
val generalSettings = GeneralSettings.getInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move GeneralSettings.getInstance out of this scope, so it won't be calculated for every doc change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops. Thanks!
val eventMulticaster = EditorFactory.getInstance().eventMulticaster | ||
val documentListener: DocumentListener = object : DocumentListener { | ||
override fun documentChanged(event: DocumentEvent) { | ||
if (unityHost.model.editorState.valueOrDefault(EditorState.Disconnected) != EditorState.ConnectedPlay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this works for o(1) then it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, our model properties cache value
if (!unityHost.model.scriptCompilationDuringPlay.hasValue) | ||
return | ||
|
||
if (unityHost.model.scriptCompilationDuringPlay.valueOrThrow != ScriptCompilationDuringPlay.RecompileAndContinuePlaying) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why valueOrThrow? Isn't throwing assertions here too aggressive?
lifetimeDefinition.terminate() | ||
} | ||
|
||
panel.createActionLabel("Don't show again") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Do not show again"
Please avoid using "don't", "ain't" and other reductions in UI
No description provided.