Search Unity

Bolt Cannot Generate Custom Inspectors

Discussion in 'Visual Scripting' started by Samuel411, Nov 2, 2020.

  1. Samuel411

    Samuel411

    Joined:
    Dec 20, 2012
    Posts:
    646
    Hello,

    Everytime I attempt to Generate custom inspectors, it is resulting in an error. I've attempted to do this on a fresh Unity project in 2020.1.0f1 and attempted on an existing project in, 2020.1.3f1. Both times I get an error similar to this one,
    upload_2020-11-2_16-12-48.png

    The other error I got was a missing NavMesh property provider in the same directory.

    I've looked online and see this as a thread on ludiq's forums multiple times and it just gets closed due to inactivity. I've also tried the discord server for bolt and no one has an answer and its been asked before only to be ignored.

    Any one have any ideas? This folder directory is completely empty and I don't think that anything is generated
     

    Attached Files:

  2. DjOxvr

    DjOxvr

    Joined:
    Dec 3, 2019
    Posts:
    4
    This is the result of a code oversight inside the Bolt source and is very easily addressed, but must be done by someone at Unity.

    We've been experiencing this issue for several minor releases now with still no fix.

    The problem is simple:
    The
    Unlock()
    method in
    VersionControlUtility.cs
    tries to modify the
    IsReadOnly
    property of a FileInfo object, even when the file does not exist. This throws an exception.

    For now you can work around by:
    1. Extracting the Bolt source. This is included in the Bolt Asset package.
    2. Modify the source as above to not modify IsReadOnly if the file does not exist.
    3. Make sure you have a backup of your project; then temporarily replace the Ludiq.Bolt plugin with the source code.
    4. Compile custom inspectors, and copy them out of the Bolt Generated folder.
    5. Remove the Bolt source from your project and restore the plugin, now with generated custom inspectors.

    Unity, if you're reading this please add an
    info.Exists
    check to that source file!
     
    dagcloworks likes this.
  3. Samuel411

    Samuel411

    Joined:
    Dec 20, 2012
    Posts:
    646
    That's stupid. Thanks for the info!
     
  4. alec100_94

    alec100_94

    Joined:
    Jan 9, 2017
    Posts:
    26
    I encountered this bug as well, and as someone who doesn't really like working with buggy software, I felt the need to put a more substantial fix for it together based on DjOxvr's answer above. So now if you copy the editor folder in the attached zip to Assets/Ludiq/Ludiq.Core it will add an additional menu item to the Bolt menu called "Generate Custom Inspectors Fixed..." right below the original "Generate Custom Inspectors...". This new menu item should work as intended making use of the info.Exists check detailed above. Hope this helps someone out.
     

    Attached Files:

  5. Samuel411

    Samuel411

    Joined:
    Dec 20, 2012
    Posts:
    646
    Wonderful fix, thank you! I hope someone at Unity looks at this, I cannot believe such an important feature is literally broken, I thought I was doing something wrong here with something so obviously important.