Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug After update to 1.7.8 my project types are missing.

Discussion in 'Visual Scripting' started by emilian-s, Jun 24, 2022.

  1. emilian-s

    emilian-s

    Joined:
    May 11, 2014
    Posts:
    7
    Hello.

    Let me explain my project setup a bit.
    I have an Assembly Definition called App in Scripts folder, that has Root Namespace set to WG. All scripts are under WG namespace.

    The App (Assembly Definition) is added to Project Settings > Visual Scripting > Node Library.

    Now, UVS fuzzy finder doesn't see any of my scripts, but it does have all the nodes I've setup before update.

    Example:
    A graph setup before update:
    upload_2022-6-25_0-9-53.png

    Current fuzzy finder:
    upload_2022-6-25_0-12-43.png

    Script code:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3.  
    4. namespace WG.UserInterface.Match
    5. {
    6.     public class ErrorScreen : BaseScreen
    7.     {
    8.         [Header("Visual Scripting Vars")]
    9.         public Button FindOpponent;
    10.         public Button Exit;
    11.     }
    12. }
    If I go to Project Settings > Visual Scripting > Type Options, I can add each script, and it will work. I can't add the namespace though, and I just can't add everything one by one there.

    Any other solutions? Please!
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,045
    I'm gonna guess that your assembly has some Unity Editor references.

    Unity recently decided that UVS graphs have to compile 100% of the time. The problem being editor only nodes that wouldn't allow to complete the build for IL2CPP platforms when UVS generates AOT stubs for those editor only nodes.

    To achieve build compilation in all use cases, they decided that any assembly containing even a minor Unity Editor reference therefore is to be discriminated against. This has resulted in two issues: no assembly with even a minor #if UNITY_EDITOR conditional code will generate AOT stubs for IL2CPP builds. The same assembly nodes won't also come up in search when added to the node library and only become accessible when adding individual types, which is your problem. Note that individually added types will still break IL2CPP builds because no AOT stubs will be generated for their reflected nodes.

    Funny thing is that this change also broke their native first party tooling like Cinemachine. The build will compile but then throw errors on the target platform since no AOT stubs are generated for Cinemachine nodes. Sometimes it feels like the Unity people working on this have no clue how Visual Scripting is used and what impact such a major change has on nearly all projects using the tool.

    More info in this thread: https://forum.unity.com/threads/no-aot-code-generated-for-a-monobehaviour.1267136/
     
  3. emilian-s

    emilian-s

    Joined:
    May 11, 2014
    Posts:
    7
    This way above my knowledge. I will look into it and try to find a solution.
    Thank you for your reply.
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,045
  5. emilian-s

    emilian-s

    Joined:
    May 11, 2014
    Posts:
    7
    Yes, 1.7.6 seem to work as expected at first look.

    With 1.7.8, besides the missing units, after each Unity restart, I've had missing ScriptableObjects references. After each restart I had to reference again some ScriptableObjects. (lucky I have around 10 and I can remember them)