Search Unity

Bug UI Builder import error CS7036

Discussion in 'UI Toolkit' started by JohnHudeski, Oct 6, 2019.

  1. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    I am not sure if this is a UI builder or package manager error

    Code (csharp):
    1. Library\PackageCache\com.unity.ui.builder@0.8.2-preview\Editor\Utilities\VisualTreeAssetExtensions\VisualTreeAssetExtensions.cs(276,37): error CS7036: There is no argument given that corresponds to the required formal parameter 'fullTypeName' of 'TemplateAsset.TemplateAsset(string, string)'
     
  2. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    Fixed by changing the entire function


    Code (CSharp):
    1.  
    2.         public static TemplateAsset AddTemplateInstance(
    3.             this VisualTreeAsset vta, VisualElementAsset parent, string path)
    4.         {
    5.             var templateName = vta.GetTemplateNameFromPath(path);
    6.             if (!vta.TemplateExists(templateName))
    7.                 vta.RegisterTemplate(templateName, path);
    8.  
    9.             var templateAsset = new TemplateAsset("template", templateName); //(templateName);
    10.             VisualTreeAssetUtilities.InitializeElement(templateAsset);
    11.  
    12.             //templateAsset.AddProperty("template", templateName);
    13.  
    14.             return VisualTreeAssetUtilities.AddElementToDocument(vta, templateAsset, parent) as TemplateAsset;
    15.         }
    Plenty of exceptions in the builder. Don't know how to show in run-time
     
    Last edited: Oct 6, 2019
  3. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    The latest 2019.3 beta changed internal APIs that the UI Builder relies on. It's part of working on top of betas. Should be fixed in the next Builder version.
     
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Wait, 2019.3 should not have this issue. Are you using 2020.1?
     
  5. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    Yes I am
     
  6. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Ok, then hand tight. A fixed version of the builder should be out soon. In the mean time, you can either downgrade your 2020.1 build, or use 2019.3 or 2019.2 for the Builder.
     
    JohnHudeski likes this.