Search Unity

Unity Visual Scripting Group Node Boxes Disappear after running app in Unity

Discussion in 'Visual Scripting' started by tigme, Nov 16, 2021.

  1. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Unity 2021.2.2f
    Visual Scripting 1.7.6

    With reference to the attached video.
    Every time I play the App and stop it the Visual Scripting Group boxes disappear.
    To get it back I have to Change the Unity theme or restart Unity.

    Does anyone else get this issue?

     

    Attached Files:

    hyunsangcho likes this.
  2. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Anywhere else I can ask about this? It drives me crazy
     
    hyunsangcho likes this.
  3. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    I Updated Unity to 2021.2.3f, Visual Scripting 1.7.6 and still have the same problem
     
    Last edited: Nov 20, 2021
    hyunsangcho likes this.
  4. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    file a bug? I get the same issue.
     
    tigme likes this.
  5. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    You can try this workaround for now. Add it to a gameobject in scene and select bool to reload scripts on exit play mode.
     

    Attached Files:

    DaringRescue, Cless_Aurion and tigme like this.
  6. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Already reported... Thanks for letting me know I'm not alone in the universe
     
  7. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Thanks will surely give it a go because I'm stuck as it is anyhow ;-)
     
  8. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Thanks your script works perfectly for me for now. ;)
     
    Trindenberg likes this.
  9. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
  10. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Seems to have more issues. After I implemented the workaround I noticed the inflow and outflow port also dissapears. Not that serious but does look a bit odd though. See attached image with red circles to show where there should be visual indicators for a in/out flow port.
     

    Attached Files:

  11. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Do you get any warnings coming up?
     
  12. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Good day, my friend... I added some extra info on the issue tracker. There were some warnings, none of which I recorded properly. I also tried to reproduce but could not. I do however get regular warnings that I cannot seem to hunt down though.

    Example: (I get x1 when I run and x1 when I stop, ie. same warning twice)

    Font not found for path:
    UnityEngine.UIElements.VisualElement:UpdateInlineRule (UnityEngine.UIElements.StyleSheet,UnityEngine.UIElements.StyleRule)
    Unity.UI.Builder.VisualTreeAssetLinkedCloneTree:CloneSetupRecursively (UnityEngine.UIElements.VisualTreeAsset,UnityEngine.UIElements.VisualElementAsset,System.Collections.Generic.Dictionary`2<int, System.Collections.Generic.List`1<UnityEngine.UIElements.VisualElementAsset>>,UnityEngine.UIElements.CreationContext)
    Unity.UI.Builder.VisualTreeAssetLinkedCloneTree:CloneSetupRecursively (UnityEngine.UIElements.VisualTreeAsset,UnityEngine.UIElements.VisualElementAsset,System.Collections.Generic.Dictionary`2<int, System.Collections.Generic.List`1<UnityEngine.UIElements.VisualElementAsset>>,UnityEngine.UIElements.CreationContext)
    Unity.UI.Builder.VisualTreeAssetLinkedCloneTree:CloneTree (UnityEngine.UIElements.VisualTreeAsset,UnityEngine.UIElements.VisualElement,System.Collections.Generic.Dictionary`2<string, UnityEngine.UIElements.VisualElement>,System.Collections.Generic.List`1<UnityEngine.UIElements.TemplateAsset/AttributeOverride>)
    Unity.UI.Builder.VisualTreeAssetLinkedCloneTree:CloneTree (UnityEngine.UIElements.VisualTreeAsset,UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.VisualTreeAssetExtensions:LinkedCloneTree (UnityEngine.UIElements.VisualTreeAsset,UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.BuilderDocumentOpenUXML:ReloadDocumentHierarchyToCanvas (UnityEngine.UIElements.VisualTreeAsset,UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.BuilderDocumentOpenUXML:ReloadChildToCanvas (Unity.UI.Builder.BuilderDocumentOpenUXML,UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.BuilderDocumentOpenUXML:ReloadDocumentToCanvas (UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.BuilderDocumentOpenUXML:OnAfterBuilderDeserialize (UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.BuilderDocument:OnAfterBuilderDeserialize (UnityEngine.UIElements.VisualElement)
    Unity.UI.Builder.Builder:OnEnableAfterAllSerialization ()
    Unity.UI.Builder.Builder:CreateUI ()
    Unity.UI.Builder.BuilderPaneWindow:CreateUIInternal ()
    Unity.UI.Builder.BuilderPaneWindow:OnEnable ()
    Unity.UI.Builder.Builder:OnEnable ()
     
  13. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    Good thing you asked, lol. Found the source of the warning. I had some UI Builder "stuff" that is not used that caused the warning.
     
  14. VrGamesDev

    VrGamesDev

    Joined:
    May 7, 2018
    Posts:
    65
    Has someone tried with a newer version?

    Current 2021.2.5
     
  15. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    I don't believe it has been fixed yet
     
  16. VrGamesDev

    VrGamesDev

    Joined:
    May 7, 2018
    Posts:
    65
    Thank you, I will wait until someone fix it, meanwhile, keep using Playmaker :(
     
  17. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    @VRGameDev just add this script to an empty GameObject and it will fix the issue for the time being

    Code (CSharp):
    1. #if UNITY_EDITOR
    2. using UnityEditor;
    3. using UnityEngine;
    4.  
    5. public class ReloadScripts : MonoBehaviour
    6. {
    7.     public bool ReloadOnExitPlayMode;
    8.  
    9.     public void OnDestroy()
    10.     {
    11.         if (ReloadOnExitPlayMode) EditorApplication.delayCall += EditorUtility.RequestScriptReload;
    12.     }
    13. }
    14. #endif
    Say thanks to @Trindenberg
     
    Trindenberg likes this.
  18. VrGamesDev

    VrGamesDev

    Joined:
    May 7, 2018
    Posts:
    65
    Thank you,

    It was really really annoying
     
    Trindenberg likes this.
  19. neilbirch2112

    neilbirch2112

    Joined:
    Oct 24, 2019
    Posts:
    6
    Yes, I have same issue. Also am sometimes unable to group nodes.
    Good to know others are having similar issues.
     
  20. mimikuwo

    mimikuwo

    Joined:
    Mar 30, 2021
    Posts:
    2
    Yes, I'm having the same problem and it's greatly reducing my productivity. I am using the latest version of 2021. this problem is not fixed.
     
  21. NeilFranci

    NeilFranci

    Joined:
    Dec 30, 2019
    Posts:
    2
    Same issue, still not fixed in Unity 2021.2.8f1
     
  22. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Try this newest idea which I suddenly noticed fixes things. Set Editor > Asset Serialization to Force Text. I might be wrong but worth a try :)
     
  23. NeilFranci

    NeilFranci

    Joined:
    Dec 30, 2019
    Posts:
    2
    nah, I've it default but still the same, now the only to fix that is use script above.
     
  24. bok

    bok

    Joined:
    Feb 24, 2014
    Posts:
    44
    Same issue here. Happens even on a completely fresh project in Unity 2022.1.0b4.
    @Trindenberg Thanks so much for the script! It makes the bug tolerable :) Also, my project was already set to Force Text, so that doesn't do the trick. But thanks again, you made my day.
     
    Trindenberg likes this.
  25. Cyrus-lam

    Cyrus-lam

    Joined:
    Mar 1, 2016
    Posts:
    7