You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on applying a new file extension to EditorSettings.projectGenerationUserExtension, so that Unity could open the file as well as the C# project in VSCode upon double-clicking those files in the Project window.
However, the modification in EditorSettings.projectGenerationUserExtension doesn't work, my extension not showing in the "Extensions handled" field in the "Configure Extensions Handled by VSCode" sector, until I click on the "Reset to default" button. That's NOT my desired behavior of it being updated Automatically.
Looking into the source code, I find the problem lies in the DefaultExtensions member in com.tsk.ide.vscode/Editor/VSCodeScriptEditor.cs. VSCodeScriptEditor applys the extensions using EditorPrefs.GetString(vscode_extension, string.Join(";", DefaultExtensions)) in the OpenProject(string, int, int) method, which means DefaultExtensions, including EditorSettings.projectGenerationUserExtension I modified, is never updated into the EditorPrefs after the first time It is called, unless clicking on the Reset to default button.
Maybe updating the extensions stored in EditorPrefs using DefaultExtensions at the beginning of the method OpenProject(string, int, int) could solve this issue. Thank you!
Reproduction / Steps To Reproduce
Add an extension into the EditorSettings.projectGenerationUserExtension field. In my case, I called it from an Awake() in an ScriptedImporter Subclass, and has validated that the code actually runs with a Debug.Log(). My code goes like this:
Look into the "Extensions handled" field in the "Configure Extensions Handled by VSCode" sector, and you'll not find the "myext" extension between those extension.
Click on the "Reset to default" button, and "myext" now appears.
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Current Behavior
Hello!
I'm currently working on applying a new file extension to
EditorSettings.projectGenerationUserExtension
, so that Unity could open the file as well as the C# project in VSCode upon double-clicking those files in the Project window.However, the modification in
EditorSettings.projectGenerationUserExtension
doesn't work, my extension not showing in the "Extensions handled" field in the "Configure Extensions Handled by VSCode" sector, until I click on the "Reset to default" button. That's NOT my desired behavior of it being updated Automatically.Looking into the source code, I find the problem lies in the
DefaultExtensions
member incom.tsk.ide.vscode/Editor/VSCodeScriptEditor.cs
.VSCodeScriptEditor
applys the extensions usingEditorPrefs.GetString(vscode_extension, string.Join(";", DefaultExtensions))
in theOpenProject(string, int, int)
method, which meansDefaultExtensions
, includingEditorSettings.projectGenerationUserExtension
I modified, is never updated into theEditorPrefs
after the first time It is called, unless clicking on theReset to default
button.Maybe updating the extensions stored in
EditorPrefs
usingDefaultExtensions
at the beginning of the methodOpenProject(string, int, int)
could solve this issue. Thank you!Reproduction / Steps To Reproduce
EditorSettings.projectGenerationUserExtension
field. In my case, I called it from anAwake()
in anScriptedImporter
Subclass, and has validated that the code actually runs with aDebug.Log()
. My code goes like this:Anything else?
No response
The text was updated successfully, but these errors were encountered: