Search Unity

Assets\Unity.VisualScripting.Generated\VisualScripting.Core\AotStubs.cs(16800,11): error CS0234: The

Discussion in 'Visual Scripting' started by Immersive-Matthew, Jul 30, 2021.

  1. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Upgraded to 2021.2.9b4 and everything went smooth but I am getting the above error which is preventing me from building to the Android Based Oculus Quest with Vulkan. I have read about error CS0234 and at a loss as to what I need to do as I very unfamlier with Visual Scripting. Any tips?

    Transform component could not be found on game object. Adding one!
    UnityEditor.SceneManagement.EditorSceneManager:OpenScene (string,UnityEditor.SceneManagement.OpenSceneMode)
    Unity.VisualScripting.AotPreBuilder/<FindAllProjectStubs>d__14:MoveNext () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:185)
    System.Linq.OrderedEnumerable`1/<GetEnumerator>d__3<Unity.VisualScripting.AotStubWriter>:MoveNext ()
    Unity.VisualScripting.AotPreBuilder:GenerateStubScript (string,System.Collections.Generic.IEnumerable`1<Unity.VisualScripting.AotStubWriter>) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:265)
    Unity.VisualScripting.AotPreBuilder:GenerateAotStubs () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:77)
    Unity.VisualScripting.AotPreBuilder:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:69)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    Much appreciated
     
    Last edited: Jul 30, 2021
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
    The first tip would be to report the error to Unity the regular way bugs are reported.

    The second tip would be to not use beta versions of the engine for development. They're not fit for production.
     
  3. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Oh...you beleive this is a flat out bug with this version of Unity? I am not using it for production, but rather wanted to try out and as surprised to see this error, but it may be due to an errror with VS in my 2021.1.15f1 prodcution title too as I am about to post another, simialr error with that version.
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
    Never had AoT Prebuild throw errors at me, usually it completes just fine but fails in build when something's wrong with project's code. So I'm fairly sure it's a UnityVS issue. It might fail if you have other compiler errors, perhaps. But otherwise it should just do its job no matter if the project is aot compatible or not.

    For AoT platforms you can't use generic collections in UnityVS variables such as List<GameObject>. You must use AoTList and AoTDictionary instead. However, you can access generic collections in C# scripts via reflection. That's practically the only thing you have to keep in mind when developing for AoT platforms.
     
  5. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137

    oh...I did not know this about Unity VS and Android. Thank you. So do I need to write c# to address the above like this? https://docs.unity3d.com/Packages/c...ng@1.6/api/Unity.VisualScripting.AotList.html
     
  6. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
  7. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    This is my one any only VS script and I have no variables? I am going to delete it and recreate and pay attention to your tips. Thanks so much.
     

    Attached Files:

  8. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    @PanthenEye I deleted the one and only object with a VS script in my heirarchy and to my surprise I am getting the same error. If I remove VS in Package Manager it builds just fine. I am stumped. Any further tips?
     
  9. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
    Likely a UnityVS incompatibility with newer versions of the engine. Report it as bug to Unity. https://unity3d.com/unity/qa/bug-reporting

    EDIT: I vaguely recall people having issues with Load Scene Async, perhaps try building without that node just to see if it works.

    EDIT #2: Also, check your Unity VS version and see if you can upgrade it. Latest version is 1.7.3 If package manager doesn't give it to you, you can force the update by editing the package manager's manifest.json manually and changing Unity Visual Scripting's version to 1.7.3 there.

    EDIT #3: You likely won't have any AoT issues with Mono scripting backend on Android.
     
    Last edited: Jul 30, 2021
  10. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    @PanthenEye


    1. I removed the one and only VS script entirely from my hierarchy. Should that not be enough as then there is no Load Async at all. Still cannot build.



    2. I am on VS 1.6.1 and updated to 1.7.3 and same error :-(



    3. Oculus only supports 64bit and thus I must use IL2CPP. I did uncheck the strip engine code, but when you hover over that option, it does say it will strip by default with IL2CPP. Doing a build with that option unchecked failed.



    Here is the funny part, since we have been chatting I achieved 3 successful builds out of like 20 attempts which is puzzling as the very next build with no changes failed. This includes right after the update of VS. How can this be? It is almost like I did something prior to the successful build that changed/refreshed something until I built which perhaps reset it back? This is just a wild a$s guess though as I am not a terribly experienced developer. Just so odd that it built fine those 2 times.



    I also noticed that it has a type mismatch under the preloaded assets (see screenshot). I deleted it as I figured it was a hangover from before along with moving elements 3, 4 and 5 up to 1, 2 and 3, yet after a build they moved back?? Plus the Type mismatch I deleted reappeared again after an attempted build. What could this be? Are some options for VS trying to get loaded and are failing or is this totally unrelated?


    Thanks so much for your insights.

    upload_2021-7-30_13-37-58.png
     
  11. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
    Honestly, I've no idea. The type mismatch might be the cause or the result of the issue but I'm not really familiar with these preloaded Android/VR assets or how they work. Probably would be a good idea to add this in your bug report.

    The last thing I'd try would be to see if the engine properly cleans up aotstubs.cs and .xml after building. If they're still there, I'd manually delete them and try building again.
     
  12. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    @PanthenEye Thanks for all your tips. I learned a few things along the way, but sadly nothing seemed to help. I was going to make a smaller project with the issue and submit to Unity, but it is giving me that dreadful TextMesh Pro error that I spent a few days to fix earlier this week and that solution does not seem to be working so I am aborting and just removed Visual Scripting. My disappointment in Unity is deepening as I really do not feel like I have a solid partner working with me. So So So many little issues and descrepencies I cannot actually beleive it. I regret using this tool.
     
  13. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
    Indeed, Unity can become frustrating when trying to link together multiple 3rd party packages. Honestly, UnityVS itself is more a 3rd party package rather than a true native tool as it uses a bunch of middleware and some of it is even outdated like FullSerializer.

    It'll be a good couple years until UnityVS is truly production ready. They're working on a completely new backend runtime, a completely new front end user interface layer and also working on replacing the serializer tech. Basically they're working on completely replacing everything that's present in the current version of UnityVS.

    They say that current graphs will be forward compatible with new versions of the package but honestly, I've yet to see it. Upgrade from Bolt 1.4 to UnityVS 1.6 or 1.7 breaks superunit serialization. One user even had his superunits break between 1.6 and 1.7 which is probably why 1.7 is only available in 2021.2 beta and not 2021.1 package manager. So the forward compatibility so far hasn't been proven. Hopefully with 1.8+ versions of the package it'll actually be what they say it should be. Only time will tell.
     
  14. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    This is good to read as Unity really does need to refresh not only VS, but the entire engine as it has so so so many descrepencies, naming inconsitencies, missing functionality, and flat out glitchy arcitecture that seems it was never meant for the sort of larger, modern demanding apps people like myself are using it for. Everytime I talk to another developer, they too have a lot of frustration. I regret using Unity as a tool, but are too deep into my current project to switch, but I will for sure give another egine a try for my next project until Unity can sort their Sh&t out.
     
  15. pikachoo788

    pikachoo788

    Joined:
    Aug 22, 2022
    Posts:
    4
    I'm confused how do i make a document???
     
  16. pikachoo788

    pikachoo788

    Joined:
    Aug 22, 2022
    Posts:
    4
    I'm new, I'm working on a fist person shooter, and don't know how to get the gun to shoot, and don't know how to get it to move.