Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug AI -> Build has errors in Location.cs trait ?

Discussion in 'AI & Navigation Previews' started by XRA, Dec 6, 2020.

  1. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    Temp\PlannerAssembly\Generated.AI.Planner.StateRepresentation\Traits\Location.cs(17,26): error CS1519: Invalid token ';' in class, struct, or interface member declaration
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library/PackageCache/com.unity.ai.planner@0.2.4-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:149)

    Temp\PlannerAssembly\Generated.AI.Planner.StateRepresentation\Traits\Location.cs(30,34): error CS1525: Invalid expression term ')'
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library/PackageCache/com.unity.ai.planner@0.2.4-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:149)

    Temp\PlannerAssembly\Generated.AI.Planner.StateRepresentation\Traits\Location.cs(30,35): error CS1002: ; expected
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library/PackageCache/com.unity.ai.planner@0.2.4-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:149)

    I was able to remove the Navigation folder (by making a local package) and was able to build. But, being new to AI Planner, is the latest release broken?

    For context I was trying to re-create the basic vacuum example in 2020.1.16f1
     
    Last edited: Dec 6, 2020
    Noxalus likes this.
  2. mplantady_unity

    mplantady_unity

    Unity Technologies

    Joined:
    Jun 19, 2019
    Posts:
    49
    Location should not need code-generation because it is included in the package here:
    com.unity.ai.planner/Runtime/Modules/Navigation/CustomTraits/Location.cs

    For some reason, in your case the TypeResolver seems to not find the type and try to regenerate it.
    Could you try to close Unity, delete your library folder and retry, to see if it happens again ?

    Thanks for the report!