Title is self-explanatory. Attempting to write code that uses ScriptEditorService will entirely defeat the purpose of typechecking, intellisense, autocomplete, and provides no documentation for it’s use in the Script Editor itself.
Expected behavior
Attempting to use the service should provide me all of it’s members and suggestions/access to it’s behavior in the Script Editor – akin to any other service.
EDIT: This is also the case for any use of ScriptDocuments - seemingly anything related to ScriptEditorService as a whole.
I can reproduce a lack of suggestions with it unchecked, but I get the suggestions I expect with it checked.
ScriptEditorService is set to Plugin level security, so normal game scripts cannot access it. Script Editor, by default, assumes that it is editing a game script and so doesn’t suggest anything for ScriptEditorService (as any suggestion would be wrong). Activating this setting tells the editor to assume it is editing a plugin script, which allows it to offer autocompletions for ScriptEditorService.
ScriptEditor should also detect that it is editing a plugin script if the script is in the PluginDebugService or its RunContext is set to plugin. Command bar always has access to plugin security objects.
I did not, but I do now! Thank you for showing me that this setting exists.
“ScriptEditorService is set to Plugin level security, so normal game scripts cannot access it. Script Editor, by default, assumes that it is editing a game script and so doesn’t suggest anything for ScriptEditorService (as any suggestion would be wrong). Activating this setting tells the editor to assume it is editing a plugin script, which allows it to offer autocompletions for ScriptEditorService.”
This is the perfect kind of information to document on Objects whose access is limited to PluginSecurity. Thank you for letting me know