3

I followed de official documentation https://developers.facebook.com/docs/ar-studio/scripting/basics/#code-autocomplete .

When I edit the script.js in *VScode* into *Mac* or *Windows*, the autocomplite like discribed on docs dont't works.

  • Search a VScode extension for Spark Ar scrips support, but, doesn't exists.
  • Search @types/sparkar, but, doesn't exists.
  • I'm doing a type, based on docs in Scripting Object Reference

3 Answers3

2

Autocomplete works! I'am using macOS, but steps should be the same on Windows. Here is what I've done to get it:

1) Install Visual Studio IntelliCode extension

enter image description here

2)Quit both SparkAr and VSCode.

enter image description here

3)Open SparkAr and from there open your script.

And you will get it!

enter image description here

lisichka ggg
  • 563
  • 3
  • 15
0

It's an old question, but if someone gets here when searching for the same problem in a more recent version (v101 in my case) here is one solution I found. In this version, the content in the folder '/private/var/folders/.../skylight-typedefs' is not included for some reason (the path can be found in the tsconfig.json that is created when adding a script to a project), so the IDE can't find the type definitions. I installed an older version and manually copied the files and added them back after upgrading to 101, then it worked.

inear
  • 11
  • 1
-2

I was in the exact situation.

On windows, you may also try to open Spark AR in Administrator mode before opening VScode

This solved the issue for me

Franzo
  • 1
  • 1