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

AI Planner - v0.2-preview released

Discussion in 'AI & Navigation Previews' started by amirebrahimi_unity, Dec 7, 2019.

  1. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    [Edit: The latest package version is the 0.2.3-preview release as of 5/5/20]

    Hello, everyone! Today we are releasing our latest update to the Unity AI Planner, version 0.2.0-preview. You can update to the new version via the package manager. Here's a few of the high-level changes you can expect in this release:
    • Customizable planning settings (i.e. when and how to plan).
    • Customizable plan execution settings (i.e. when and how to act).
    • Better support for custom planner extensions.
    • Terminal state rewards.
    • Improved code generation and compilation.
    • Improved UI with re-orderable lists, better operand validation, and plan visualizer inspector.
    • Improved inspector workflow with new components (DecisionController, TraitComponent), operational actions as parameterized callbacks, and filtering of the game scene through world queries.
    • Initial support for trait gizmos.
    This update includes a fairly extensive refactor of various parts of the package, which can break projects built with prior versions. Notably, look out for the following changes:
    • AgentDefinitions have been replaced with PlanDefinitions
    • DomainObjectProvider has become TraitComponent
    • BaseAgent has been removed, with its responsibilities divided between DecisionController and custom generated extensions to BasePlanExecutor.
    • IOperationalActions have been replaced by parameterized method callbacks, assigned on the DecisionController.
    • DomainObject*** classes and structs have been refactored to match TraitBasedObject*** naming.
    For this update, we're releasing both a new tutorial to walk you through a simple example setup from an empty project as well as a few sample projects for you to explore. We will continue to grow this set over time in order to provide examples of the many potential applications of the planner package. For now, this repo includes the following samples:
    • VacuumRobot - Control a robot optimizing its path through an ever-dirty world.
    • Match3 - Use planning to solve goal-based, tile-matching puzzles.
    • EscapeRoom - Escape a room with locked doors, a key, and pressure switches by coordinating three agents with a single planner.
    Please note: the previous Otto sample has not been updated to use version 0.2.0 of the AI Planner yet.

    Thanks, everyone, for your helpful feedback! We look forward to seeing the many creative ways you use the package!

    Step-by-step guide: https://drive.google.com/open?id=1bakwqeR-iWzIA7Zc28yv3qBhrCKhgsQ5nj8uRK0ueJM
    Step-by-step video: https://drive.google.com/open?id=1a4fS9gW5z620lxzTMZZ2Seq7BjuRk3iC
    New samples repository: https://github.com/Unity-Technologies/ai-planner-samples
     
    Last edited: May 6, 2020
  2. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    The step by step is a really nice start!
    I got stuck on the step Select “New Query”. I have the option of use plan state or use world state.

    If I expand the box underneath with Include objects. I get a nullref

    Code (CSharp):
    1. ArgumentNullException: Value cannot be null.
    2. Parameter name: key
    3. System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <437ba245d8404784b9fbab9b439ac908>:0)
    4. System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <437ba245d8404784b9fbab9b439ac908>:0)
    5. UnityEngine.AI.Planner.DomainLanguage.TraitBased.TraitBasedObjectData.Initialize (UnityEngine.GameObject gameObject) (at Library/PackageCache/com.unity.ai.planner@0.2.0-preview.4/Runtime/Serialization/TraitBasedObjectData.cs:45)
    6. UnityEngine.AI.Planner.DomainLanguage.TraitBased.TraitComponent.Initialize () (at Library/PackageCache/com.unity.ai.planner@0.2.0-preview.4/Runtime/World/TraitComponent.cs:56)
    7. UnityEditor.AI.Planner.Editors.DecisionControllerInspector+<>c__DisplayClass8_3.<OnInspectorGUI>b__7 (UnityEngine.AI.Planner.DomainLanguage.TraitBased.TraitComponent objectData) (at Library/PackageCache/com.unity.ai.planner@0.2.0-preview.4/Editor/Inspectors/DecisionControllerInspector.cs:239)
    8. System.Linq.Enumerable+WhereArrayIterator`1[TSource].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    9. System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    10. UnityEditor.AI.Planner.Editors.DecisionControllerInspector.OnInspectorGUI () (at Library/PackageCache/com.unity.ai.planner@0.2.0-preview.4/Editor/Inspectors/DecisionControllerInspector.cs:242)
    11. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass55_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <3b74787e58694cdda2c241162159b3b7>:0)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    13.  
    upload_2019-12-7_11-39-5.png
     
  3. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Just confirmed this. This is an error that occurs until you select your traits on the TraitComponent. Once selected the error goes away. It's benign, but we'll fix it nonetheless in the next minor release. Thanks.
     
  4. vx4

    vx4

    Joined:
    Dec 11, 2012
    Posts:
    181
    Thanks for good work.
     
  5. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    100
    Questions related to a systems driven game:

    1) Can I create actions and preconditions etc using scriptableobjects.
    2) Would it be ton of computational or memory overhead for making a huge list of items.
    3) Are there any techniques you would suggest for making dynamic items that rely on adjuctives to decide on behavior (perhaps a dictionary using scriptables as keys and scriptables for systems).

    Must be said, that only up to a max of 20 (in crazier situations) would be enabled at a time, with typical use cases being 1-2 AI making basic decisions in realtime when it's their turn.
     
    Last edited: Dec 8, 2019
  6. chantey

    chantey

    Joined:
    Mar 5, 2017
    Posts:
    49
    Awesome!

    One gotchya I ran into (which is probably obvious for most) is the Action Callbacks found in the Decision Controller expect an IEnumerator to return null while the action is being performed. A regular method will end the action immediately:

    Code (CSharp):
    1.     //this will end the action whenever I falsify isSeeking in a fixed update method etc.
    2.     public IEnumerator GoToTarget(GameObject targetGo)
    3.     {
    4.         this.target = targetGo.transform;
    5.         isSeeking = true;
    6.         while (isSeeking)
    7.             yield return null;
    8.         Debug.Log($"target reached!");
    9.     }
    10.  
    11.     //this will immediately end the action
    12.     public void GoToTargetImmediate(GameObject targetGo)
    13.     {
    14.         transform.position = targetGo.transform.position;
    15.     }
    Another was, when writing navigation actions, its important to update the Agent Position to the Target Position. Otherwise the planner thinks the agent is still at its origin:



    I made a fun little 'travelling salesman' hello world. Interestingly, he seems to choose a slightly different route each time..




    Here's the GitHub.
     
  7. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Answers to your questions:
    1) Can you share more about what you mean by scriptableobjects? Our data is currently serialized in scriptableobjects. If you are wondering if you can automate the creation of these assets via code, then take a look at the editor tests for the package as we do just that.
    2) I need more clarification here, but I'll take this to introduce the consideration of branching factor from each state to the next. If you have a simple action such as Navigate and you have N locations all accessible from each other, then at every step of the way the planner is going to consider N-1 instances of the Navigate action. In this case you would want to keep N low, which can be limited with the world filters in the DecisionController.
    3) Can you share a little more on this one, too? By dynamic items are you meaning that you'd like to spawn new items of various types at run-time and have the planner adjust and create optimal plans to those? If so, then the VacuumRobot sample is a good one to look at.
     
  8. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    100
    Thanks for the response! You've answered all my questions!
     
  9. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    The sample projects are really helpful!!

    I was playing around with limiting the list count on the vacum example to keep processing time down but if it goes to zero it doesn't re-find the dirt again even if something is close by.

    I also fell over a nullref if there is a null component on the mono you drop in DecisionController->Available actions settings. minor but it's in OnInspectorGUI so you can't un drag and drop it or see it.
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.AI.Planner.Editors.DecisionControllerInspector+<>c.<OnInspectorGUI>b__8_2 (UnityEngine.MonoBehaviour c) (at Library/PackageCache/com.unity.ai.planner@0.2.0-preview.4/Editor/Inspectors/DecisionControllerInspector.cs:157)
    3. System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].ToArray () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    4. System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
    5. UnityEditor.AI.Planner.Editors.DecisionControllerInspector.OnInspectorGUI () (at Library/PackageCache/com.unity.ai.planner@0.2.0-preview.4/Editor/Inspectors/DecisionControllerInspector.cs:157)
    6. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass55_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <83a73882c51c4602b3d34743827d03e7>:0)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  10. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    I've fixed the issue you found and it will be in the next release. Re: the robot not finding another dirt if it is close by, my intuition without having reproduced the issue is that the plan is marked complete because there is no available actions since there are no dirt objects found. Since there are no actions to take there will be no updates to the state to reflect a change in the world. I'll have to discuss this with the team.
     
    PaulUsul likes this.
  11. Zennythedreamer

    Zennythedreamer

    Joined:
    Mar 8, 2019
    Posts:
    4
    Hi! I was wondering if someone could point me in the right direction of how I could approach implementing something akin to senses or a memory using this planner system.
     
  12. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Could you share more about what you are hoping to do? Ultimately, this will come down to domain modeling and how you want to represent your state.
     
    Zennythedreamer likes this.
  13. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    Looking forward to the next release :) I'm running into a few errors when running standalone x64, it's very close to the step by step guide but with 3 agents and no apples. I've attached my Generated folder if that helps, I'll try and reproduce it with a simpler project.

    Code (CSharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object.
    3.   at Unity.Entities.FastEquality+CompareImpl`1[T].CompareFunc (System.Void* lhs, System.Void* rhs) [0x00000] in <0...0>:0
    4.   at Unity.Entities.FastEquality+CompareImpl`1[T].CompareFunc (System.Void* lhs, System.Void* rhs) [0x00000] in <0...0>:0
    5.   at System.Linq.OrderedEnumerable`1[TElement].System.Linq.IOrderedEnumerable<TElement>.CreateOrderedEnumerable[TKey] (System.Func`2[T,TResult] keySelector, System.Collections.Generic.IComparer`1[T] comparer, System.Boolean descending) [0x00000] in <0...0>:0
    6.   at AI.Planner.Domains.ConditionalType..ctor () [0x00000] in <0...0>:0
    7.   at UnityEngine.AI.Planner.DomainLanguage.TraitBased.PlanningDomainData`5[TObject,TStateKey,TStateData,TStateDataContext,TStateManager].CreateStateData (Unity.Entities.EntityManager entityManager, System.Collections.Generic.IEnumerable`1[T] traitBasedObjects) [0x00000] in <0...0>:0
    8.   at UnityEngine.AI.Planner.DomainLanguage.TraitBased.BasePlanExecutor`9[TObject,TStateKey,TStateData,TStateDataContext,TActionScheduler,THeuristic,TTerminationEvaluator,TStateManager,TActionKey].InitializePlannerSystems (System.String name, System.Collections.Generic.IEnumerable`1[T] traitBasedObjects, UnityEngine.AI.Planner.DomainLanguage.TraitBased.PlanDefinition planDefinition) [0x00000] in <0...0>:0
    9.   at UnityEngine.AI.Planner.DomainLanguage.TraitBased.BasePlanExecutor`9[TObject,TStateKey,TStateData,TStateDataContext,TActionScheduler,THeuristic,TTerminationEvaluator,TStateManager,TActionKey].Initialize (System.String name, UnityEngine.AI.Planner.DomainLanguage.TraitBased.PlanDefinition planDefinition, System.Collections.Generic.IEnumerable`1[T] initialTraitBasedObjects, UnityEngine.AI.Planner.PlanExecutionSettings settings) [0x00000] in <0...0>:0
    10.   at UnityEngine.AI.Planner.Controller.DecisionController.Initialize () [0x00000] in <0...0>:0
    11.   at UnityEngine.AI.Planner.Controller.DecisionController.Start () [0x00000] in <0...0>:0
    12. (Filename: currently not available on il2cpp Line: -1)
    13.  
    and then after Start in update

    Code (CSharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object.
    3.   at UnityEngine.AI.Planner.DomainLanguage.TraitBased.BasePlanExecutor`9[TObject,TStateKey,TStateData,TStateDataContext,TActionScheduler,THeuristic,TTerminationEvaluator,TStateManager,TActionKey].NextActionAvailable () [0x00000] in <0...0>:0
    4.   at UnityEngine.AI.Planner.DomainLanguage.TraitBased.BasePlanExecutor`9[TObject,TStateKey,TStateData,TStateDataContext,TActionScheduler,THeuristic,TTerminationEvaluator,TStateManager,TActionKey].ReadyToAct () [0x00000] in <0...0>:0
    5.   at UnityEngine.AI.Planner.Controller.DecisionController.UpdateExecutor () [0x00000] in <0...0>:0
    6.   at DwarvenKingdoms.DwarDecisionController+<Start>d__1.MoveNext () [0x00000] in <0...0>:0
    7.   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <0...0>:0
    8.  
     

    Attached Files:

  14. MstislavPavlov

    MstislavPavlov

    Joined:
    Sep 22, 2013
    Posts:
    36
    Hi there!

    How i can create inventory with item collection?
     
  15. vx4

    vx4

    Joined:
    Dec 11, 2012
    Posts:
    181
    Could you provide more details regards ICustomHeuristic.Evaluate, Like when need to change default Imp. and how does return value effect planing.
     
  16. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Would you mind sharing more of your project so I can take a closer look? You can either upload it here or email it to ai.research@unity3d.com.
     
    Zennythedreamer and PaulUsul like this.
  17. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    [/ICODE]
    Until we support collections on traits (so you can have
    MyObject.MyInventoryTrait.Items
    ), you can instead try adding an
    InventoryItem
    trait with an
    Owner
    field, which holds the object ID of the object whose inventory the item belongs to.
     
  18. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    We're planning a blog post/extra documentation that provides a high-level overview of how the search works, including how to think about and implement custom heuristics. Until then, I'll give a short overview of how the heuristic should operate.

    Given a state to evaluate, a custom heuristic can be used to provide three values (making up a BoundedValue ) used in the graph search:
    • An average/estimate of the cumulative reward/cost to be received from the state onward. The current plan includes the exact rewards leading up to this state. The heuristic provides an estimate how much reward will be accumulated beyond this state. Together, we have an estimate of the total reward (exact rewards leading to the state + estimated reward after the state). When the agent acts, it will choose the next immediate action that maximizes the estimated cumulative reward of the entire plan.
    • An upper bound (optimistic estimate) on the cumulative rewards to be received from the given state onward. If you've worked with A*, say for pathfinding, you'll know that A* requires an admissible or optimistic heuristic estimate to find the optimal path (typically Euclidean distance in pathfinding). This is key for the search to explore branches of the state space which might improve the current plan.
    • Finally, a lower bound (pessimistic estimate) for the future cumulative rewards. This value is used to prune branches of the (incomplete) plan during the iterative search process, such that we don't waste iterations in areas of the state space with lower reward. Example: consider a scenario where we can take either of two actions leading to states A and B, with bounded value estimates [lower=5, est=7, upper=10] and [lower=0, est=2, upper=3], respectively. Since we know that the worst case of the first action (lower bound = 5) is greater than the best case of the second action (upper bound = 3), we prune from consideration the second action.
    We'll go into more detail about how we use the heuristics to iteratively refine state and action value estimates in the full blog post, but hopefully that will give some clarity on how to think about heuristics in our package.

    Some tips:
    • If the planner is being used to compute a plan toward a fixed goal, try to have the heuristic converge to narrower bounds the closer to the goal the state is. This can help the search process immensely.
    • Be aware of the trade-offs of choosing bounds estimates that are too conservative (i.e. high upper bounds and low lower bounds). If your optimistic estimate is too high, the search can spend many iterations exploring branches that "might" be good but, in truth, are not. Similarly, if your lower bound estimates are too low, no pruning occurs, which can result in a shallow search with short, incomplete plans.
    • Conversely, try not give bounds estimates that are narrower/tighter than true cumulative future rewards. If your upper bound estimate is too low, the search can miss branches that lead to the true "optimal" plan. If your lower bound estimate is too high, the search might prune branches it shouldn't.
     
    vx4 and florianhanke like this.
  19. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    FYI

    There is no scenes in the Match3 or EscapeRoom examples
     
  20. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    The scenes are under Assets/SampleMatch3 and Assets/FirstRoom, respectively. I realize now that doesn't match the file structure of VacuumRobot. Sorry for the confusion!
     
    vincismurf likes this.
  21. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    I was cleaning up a project to send and found and old folder with fubar assets(attached). I'm not sure now that it was the main problem but could be.
    I've tried re-doing the step by step guide and then setting settings like they are in my project and that seems to have reproduced the errors. I have the backend set to il2cpp, build settings to development and script debugging on and I get errors in the simplest example. where it works in the editor. I've attached a project.
    It seems to be the il2cpp that's the problem
     

    Attached Files:

  22. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    What are you aiming for performance wise? or is there some trick to making the example a bit more performant? Seeing huge slow downs with 3 agents and 10 eatable objects.

    The vacuum cleaner project slows down at 1 agent 50 objects and is kind of easily solvable by limiting objects considered with radius . With 3 agents it only gets to around 25+ objects.

    I had wrongly assumed that trait components where converted to entities, but they're not. Where do you use entities? and would it be easy to use by a hybrid/pure project? are they compatible? it seems entities are used but somewhere under the hood, in another world?
     
  23. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Here are some performance tips:
    • Disable leak detection and enable Burst in the Jobs menu.
    • Limit the number of objects the agent perceives/reasons about. The most straightforward way to do this is through the "World query" on the decision controller. If you've set "Next State Update" to "Use World State" on your actions in the DecisionController, the agent will query the scene's game objects to update its world state. You can build this query in the last section of the DecisionController.
    • Use advanced settings in order to manually control when and how much search occurs. You can access these settings via the cog, shown below. Each of the settings has a tooltip, FYI. If planning occurs too often, reduce the frequency. If your plans are larger than needed, try capping the plan size. If your plans are necessarily large, try out the parallel selection and backpropagation job modes, which operate more efficiently on large plans but less efficiently on small plans.
    upload_2019-12-18_9-15-30.png


    We don't current have a performance target, specifically. Rather, our long-term goal is to make this as fast as possible. In fact, in version 0.2.1 (coming hopefully within a week!), we've achieved nearly 100% Burst compatibility among our planning jobs (a ~40x speedup for some of our jobs), plus you'll have the ability to schedule multiple planning iterations at once and let the planning jobs run over multiple frames without needing to complete them, which will help considerably.

    Exactly! Hopefully you're using the "In radius" query to do this. Our roadmap includes an entire perception layer, which will manage when agents are notified of state changes and with respect to what objects. Our current query system does this to a degree, but it's not particularly performant in its current form. It's an initial attempt at a much larger system we're going to build.

    The trait component data is not yet stored in ECS, but it will be in the coming months. In the current form, game state trait data is stored as objects in the trait component (allowing us to build generic tools, as we have), while the plan state data is stored in ECS. Each plan state is associated with an entity holding buffers of the trait and object data.

    Currently, we don't support a pure DOTS solution, though it is on our pre-GDC roadmap. First, we need to move the game state data to ECS, then we'll need to build component systems to manage plan and action execution. It's going to be quite an undertaking, but we have a concrete idea of how this will look. We're just going to need the time to build it.

    Hope that helps!
     
  24. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    That's amazing! :) Looking forward to all of that!

    I'll play more with the queries, sounds really powerful

    Sounds like you have a solid roadmap ahead! will enjoy following along :D
     
    vx4 likes this.
  25. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Yes, it seems the package doesn't work with il2cpp. It's something we had not yet tested, but it will now be a feature on our roadmap. Thanks for notifying us about the issue!
     
    PaulUsul likes this.
  26. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Hi, everyone! We're releasing 0.2.1-preview today, so be sure to check it out! Here's a short snapshot of the changes in this release (straight from our changelog):

    Added
    * IsIdle to `IDecisionController` to reflect when the controller is not planning and not executing actions.
    * UpdateStateWithWorldQuery to `IDecisionController` to allow updating the planner outside of action complete, such as where the plan is complete.
    * BoundedValue validity checks (e.g. NaN, infinity) for when custom heuristics go awry.
    * 32-bit integer field support for traits.
    * Play back the EntityCommandBuffer (for state changes) on a separate thread instead of the main thread.
    * Documentation for custom traits.
    * Planner setting for scheduling multiple iterations of search at once.
    * Action jobs, state evaluation jobs, and graph expansion jobs are now Burst-compatible.

    Changed
    * Code now generates to the Packages directory as source.
    * Expose discount factor in the PlanDefinition settings.
    * Planner search and execution settings stay open when switching to play mode.
    * Clean up public API by hiding unnecessary interfaces, structs, and fields.
    * No longer block on previously scheduled planner iteration in the frame and simply wait until the job chain is complete.

    Removed
    * Moveable.cs -- trait no longer uses `CustomTrait`, but instead gets generated from its `TraitDefinition`.

    Fixed
    * Custom heuristic was not always getting picked up during code generation, so now the fully qualified name is serialized.
    * Compilation upon switching to play mode is more reliable now.
    * Null reference exceptions when adding a `TraitComponent` initially with no traits added.
    * Exception when dragging a GameObject with a missing component to an action callback of the `DecisionController`.
    * Comparison of custom traits during state equality.
    * Improved performance while the plan executor waits for plan execution criteria.

    The most significant changes you'll see are:
    (1) Improved performance due to enhanced Burst-compatibility across some of our planning jobs, the ability schedule multiple iterations of planning, and reduced allocations from collecting state information from the game scene.
    (2) Generating code into your project's "Packages" directory, which makes the code generation and compilation process much smoother.

    Updated documentation and samples will be coming as well, so keep a look out for those! And as always, let us know what you think!

    Happy Holidays!
     
    eugolana, Ofx360, vincismurf and 4 others like this.
  27. Vyzier

    Vyzier

    Joined:
    Feb 22, 2015
    Posts:
    21
    Hi! I'm using Unity 2019.3.0f3 and I've installed 0.2.1 preview 3 on a fresh project, yet when I click Play, I keep getting this error:

    ArgumentException: scriptPaths cannot be null or empty
    UnityEditor.Compilation.AssemblyBuilder..ctor (System.String assemblyPath, System.String[] scriptPaths) (at <83a73882c51c4602b3d34743827d03e7>:0)
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.BuildAssembly (System.String[] paths, System.String outputPath, System.String[] excludeReferences, System.String[] additionalReferences, System.String[] additionalDefines) (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:221)
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.Build () (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:134)
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.OnPlayModeStateChanged (UnityEditor.PlayModeStateChange playMode) (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:73)
    UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <83a73882c51c4602b3d34743827d03e7>:0)
    UnityEditor.EditorApplication:set_isPlaying(Boolean)
    Unity.Entities.Editor.LiveLinkToolbar:TogglePlaying() (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:91)
    Unity.Entities.Editor.LiveLinkToolbar:DrawPlaybar(CommandExecuteContext) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:58)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    This error shows up with 0.2.1 preview 2 too, but the 0.2.0 preview 4 and earlier seem to work fine. Any suggestions? Thanks!

    EDIT: I seem to have found the solution. Unlike the older versions, valid actions, plans, and traits need to be created first before even being able to hit Play.
     
    Last edited: Dec 24, 2019
    amirebrahimi_unity likes this.
  28. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Thank you for reporting this. We've never checked making a build without any traits, actions, or plans. This will be fixed in a future version. However, for this release your workaround is the correct one.
     
  29. Xilinnilix

    Xilinnilix

    Joined:
    Nov 19, 2018
    Posts:
    9
    I'm trying to run the examples in 2019.3.0f3. Hitting AI->Planner->Generate assemblies gives me the following exception. Running on Linux.


    ArgumentException: Second path fragment must not be a drive or UNC name.
    Parameter name: path2
    System.IO.Path.InternalCombine (System.String path1, System.String path2) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit () (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.Directory.GetDirectories (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.Directory.RecursiveDelete (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.IO.Directory.Delete (System.String path, System.Boolean recursive) (at <437ba245d8404784b9fbab9b439ac908>:0)
    UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.Build () (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:144)

     
  30. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    I don't believe anyone on our team has tested the planner on Linux, so thank you for reporting this. We'll have to look into why this is occurring.
     
  31. shrinebot

    shrinebot

    Joined:
    Sep 12, 2014
    Posts:
    16
    Hi,

    So I'm looking for some advice; Im very interested in using your new AI planner for our game which is a turn-based strategy board game with PvP online multiplayer and vs AI.

    Up to now our AI has been hand-authored, but due to the ever increasing complexity of the games features and rule-set is pushing me towards a Planner solution.

    However our game is already 'live' therefore has a lot of rules and fairly complex logic, which brings me to my key point: do you think this could be adapted to work with existing logic using say the custom planner extensions? (Im still getting my head around the package and there doesn't seem to be many custom examples in the 3 sample projects)

    My worry is that translating our games logic & data structures (game-state, traits, action-preconditions, action-effects etc...), into your domain language would be way too far out of our scope, but if I could create custom actions that call our existing functions to do the complex logic of whether an action is valid. Then create new Goals & Plans, would that work?

    I know this is likely v.hard to answer without knowing our games structure, but thought I'd ask before going too far down the rabbit-hole.

    Many thanks in advance ;)
     
  32. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Have you read through the documentation for custom planner extensions? It's fairly minimal at the moment, but it should help get you started. Plus, you can always ask us questions here or via email. Link: https://docs.unity3d.com/Packages/com.unity.ai.planner@0.2/manual/CustomPlannerExtensions.html

    It honestly comes down to the complexity of the scenario you'd like the agent to reason about. Our Match3 sample calls into code to do complex logic, as it simulates chaining of matches. As long as your code is Burst-compatible, you should be able to do similarly. Unfortunately, translating your game representation into traits is an unavoidable necessity for using our package in its current state. Hopefully the trait language is flexible enough to let you represent the game's mechanics. If not, let us know! We're considering language extensions based on user needs.

    One thing to note: I imagine you may want to simulate what the opposing player(s) will do and incorporate that into the plan, yes? Currently, we don't have any samples that make such predictions about other agents in the system. It's certainly possible, but you'll need to think carefully about how to best model and incorporate these predictions.

    No worries. That's why we're here! If you'd like to share more about your game, feel free to reach out to us by email. :)
     
  33. JuaniHoi

    JuaniHoi

    Joined:
    Jan 14, 2016
    Posts:
    2
    I had the same with MacOS (Version 10.15.2). I'm also running 2019.3.0f3 Unity.

    I removed the AI Planner Actions (Generated Code) and AI Planner Domains (Generated Code) from the Package Manager. Restarted Unity, and pressed play again. Then it worked again.

    I wonder what did I do wrong, since my project was working at the some point. I played around with it, changed some things and then I got this error.

    I'll get back to you, if I figure out how to reproduce this error.
     
    Last edited: Jan 7, 2020
  34. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Please do! We haven't done any extensive testing on MacOS, but we'll need to root out issues like this before our full release. Thanks for letting us know you also ran into the issue.
     
  35. shrinebot

    shrinebot

    Joined:
    Sep 12, 2014
    Posts:
    16
    Thanks for the detailed response Trevor, unfortunately I think we are too far down the road already to be able to integrate your AI Planner into our game-logic in a reasonable time-frame, so we may just roll-our-own custom planner solution. I'll be keeping an eye on this as it progresses, as it seems like a really awesome package. Cheers!
     
  36. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    I'm getting this error when trying to generate assemblies. the planner resources looks good though.
    [edit]Has anyone else experienced adding the ai planner silently killing other ecs systems?
    Code (csharp):
    1. Exception while trying to parse Scriban template.UnityEngine.UnassignedReferenceException: The variable m_TemplateDomainsAsmDef of PlannerResources has not been assigned.
    2. You probably need to assign the m_TemplateDomainsAsmDef variable of the PlannerResources script in the inspector.
    3.   at (wrapper managed-to-native) UnityEngine.TextAsset.get_text(UnityEngine.TextAsset)
    4.   at UnityEditor.AI.Planner.CodeGen.CodeRenderer.GetCachedTemplate (UnityEngine.TextAsset templateAsset) [0x0001e] in D:\project\DwarvenKingdomsReborn\DwarvenKingdoms\Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\CodeRenderer.cs:31
    5. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    6. Unity.Entities.Editor.LiveLinkToolbar:TogglePlaying() (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:91)
    7. Unity.Entities.Editor.LiveLinkToolbar:DrawPlaybar(CommandExecuteContext) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:58)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    and
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. UnityEditor.AI.Planner.CodeGen.CodeRenderer.RenderTemplate (UnityEngine.TextAsset templateAsset, System.Object templateData) (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/CodeRenderer.cs:17)
    4. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.Build () (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:156)
    5. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.OnPlayModeStateChanged (UnityEditor.PlayModeStateChange playMode) (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:73)
    6. UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <83a73882c51c4602b3d34743827d03e7>:0)
    7. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    8. Unity.Entities.Editor.LiveLinkToolbar:TogglePlaying() (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:91)
    9. Unity.Entities.Editor.LiveLinkToolbar:DrawPlaybar(CommandExecuteContext) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:58)
    10. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    11.  
    upload_2020-1-8_15-9-36.png
     
    Last edited: Jan 8, 2020
  37. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Which ECS systems? We've never run into that issue.

    @amirebrahimi_unity and I have run into this issue, typically when switching branches of our demo projects without restarting Unity. Try restarting Unity when you run into this. We suspect it has something to do with ScriptableSingleton, but we have not tracked down the exact issue yet.
     
  38. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    No worries! Let us know how your custom solution works out. We're always happy to hear game AI success stories. And consider our package for your next project!
     
  39. JuaniHoi

    JuaniHoi

    Joined:
    Jan 14, 2016
    Posts:
    2
    I found the cause for the error:
    Code (CSharp):
    1. ArgumentException: Second path fragment must not be a drive or UNC name.
    2. Parameter name: path2
    3. System.IO.Path.InternalCombine (System.String path1, System.String path2) (at <437ba245d8404784b9fbab9b439ac908>:0)
    4. System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit () (at <437ba245d8404784b9fbab9b439ac908>:0)
    5. System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
    6. System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
    7. System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
    8. System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <437ba245d8404784b9fbab9b439ac908>:0)
    9. System.IO.Directory.GetDirectories (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
    10. System.IO.Directory.RecursiveDelete (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
    11. System.IO.Directory.Delete (System.String path, System.Boolean recursive) (at <437ba245d8404784b9fbab9b439ac908>:0)
    12. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.Build () (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:144)
    13. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder.OnPlayModeStateChanged (UnityEditor.PlayModeStateChange playMode) (at Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs:73)
    14. UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:415)
    15. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    16. Unity.Entities.Editor.LiveLinkToolbar:TogglePlaying() (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:91)
    17. Unity.Entities.Editor.LiveLinkToolbar:DrawPlaybar(CommandExecuteContext) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Editor/LiveLink/LiveLinkToolbar.cs:58)
    18. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
    It is caused by PlannerAssemblyBuilder >> Build() method.
    More accurately:
    Directory.Delete()

    and
    File.Delete()


    Since MacOS doesn't seem to cope with "//" in the relative paths.

    To fix it, something like this needs to be done:
    Code (CSharp):
    1. string newDomainsSourceDir = domainsSourceDir.Replace(@"//",@"/");
    2.                         Directory.Delete(newDomainsSourceDir, true);
    3.                         File.Delete($"{newDomainsSourceDir}.asmdef");
    Code (CSharp):
    1. string newActionsSourceDir = actionsSourceDir.Replace(@"//",@"/");
    2.                         Directory.Delete(newActionsSourceDir, true);
    3.                         File.Delete($"{newActionsSourceDir}.asmdef");

    The PlannerAssemblyBuilder class seems to be a remade all the time. Is there a way for me to affect on it, or make the code changes permanent?
    Or is waiting for the new patch only solution at the moment?
     
    Delphic_ likes this.
  40. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    Ah! I'll make sure we get that fixed in our next release. Thanks for the info!

    You should be able to copy the package files (in Library/PackageCache) to a local directory, then change your manifest.json (in Packages) to point to the local copy. Ex:

    Code (CSharp):
    1. {
    2.   "dependencies": {
    3.     "com.unity.ai.planner": "file:./YourLocalPackageDirectory",
    4.     ...
    5. }
     
    Delphic_ and JuaniHoi like this.
  41. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29

    All of them in the default world. uninstalled aip and resolved it, re-installed and can't reproduce it now which is sad. It happened spawning an agent with a decisionController on it. I'll keep a lookout.

    I caught an infinite loop today, I think it came from renaming an action parameter name and then not updating it's decision controller action lists, then recompiling. log file grew to 45mb lol

    Code (CSharp):
    1. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:Log(LogType, Object)
    5. UnityEngine.Debug:Log(Object)
    6. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:71)
    7. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    8. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    9. UnityEditor.EditorApplication:EnterPlaymode()
    10. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    11. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    12. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    13. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    14. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    15. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    16. UnityEditor.Compilation.AssemblyBuilder:get_status()
    17. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    18. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    19. (Filename: Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs Line: 71)
    20.  
    21. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    22. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    23. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    24. UnityEngine.Logger:Log(LogType, Object)
    25. UnityEngine.Debug:Log(Object)
    26. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:71)
    27. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    28. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    29. UnityEditor.EditorApplication:EnterPlaymode()
    30. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    31. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    32. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    33. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    34. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    35. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    36. UnityEditor.Compilation.AssemblyBuilder:get_status()
    37. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    38. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    39. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    40. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    41. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    42. UnityEditor.EditorApplication:EnterPlaymode()
    43. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    44. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    45. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    46. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    47. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    48. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    49. UnityEditor.Compilation.AssemblyBuilder:get_status()
    50. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    51. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    52. (Filename: Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs Line: 71)
    53.  
    54. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    55. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    56. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    57. UnityEngine.Logger:Log(LogType, Object)
    58. UnityEngine.Debug:Log(Object)
    59. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:71)
    60. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    61. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    62. UnityEditor.EditorApplication:EnterPlaymode()
    63. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    64. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    65. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    66. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    67. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    68. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    69. UnityEditor.Compilation.AssemblyBuilder:get_status()
    70. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    71. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    72. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    73. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    74. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    75. UnityEditor.EditorApplication:EnterPlaymode()
    76. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    77. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    78. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    79. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    80. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    81. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    82. UnityEditor.Compilation.AssemblyBuilder:get_status()
    83. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    84. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    85. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    86. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    87. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    88. UnityEditor.EditorApplication:EnterPlaymode()
    89. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    90. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    91. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    92. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    93. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    94. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    95. UnityEditor.Compilation.AssemblyBuilder:get_status()
    96. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    97. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    98. (Filename: Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs Line: 71)
    99.  
    100. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    101. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    102. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    103. UnityEngine.Logger:Log(LogType, Object)
    104. UnityEngine.Debug:Log(Object)
    105. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:71)
    106. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    107. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    108. UnityEditor.EditorApplication:EnterPlaymode()
    109. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    110. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    111. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    112. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    113. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    114. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    115. UnityEditor.Compilation.AssemblyBuilder:get_status()
    116. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    117. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    118. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    119. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    120. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    121. UnityEditor.EditorApplication:EnterPlaymode()
    122. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    123. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    124. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    125. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    126. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    127. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    128. UnityEditor.Compilation.AssemblyBuilder:get_status()
    129. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    130. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    131. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    132. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    133. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    134. UnityEditor.EditorApplication:EnterPlaymode()
    135. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    136. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    137. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    138. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    139. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    140. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    141. UnityEditor.Compilation.AssemblyBuilder:get_status()
    142. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    143. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    144. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    145. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    146. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    147. UnityEditor.EditorApplication:EnterPlaymode()
    148. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    149. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    150. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    151. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    152. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    153. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    154. UnityEditor.Compilation.AssemblyBuilder:get_status()
    155. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    156. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    157. (Filename: Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs Line: 71)
    158.  
    159. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    160. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    161. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    162. UnityEngine.Logger:Log(LogType, Object)
    163. UnityEngine.Debug:Log(Object)
    164. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:71)
    165. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    166. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    167. UnityEditor.EditorApplication:EnterPlaymode()
    168. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    169. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    170. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    171. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    172. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    173. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    174. UnityEditor.Compilation.AssemblyBuilder:get_status()
    175. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    176. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    177. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    178. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    179. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    180. UnityEditor.EditorApplication:EnterPlaymode()
    181. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    182. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    183. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    184. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    185. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    186. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    187. UnityEditor.Compilation.AssemblyBuilder:get_status()
    188. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    189. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    190. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    191. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    192. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    193. UnityEditor.EditorApplication:EnterPlaymode()
    194. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    195. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    196. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    197. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    198. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    199. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    200. UnityEditor.Compilation.AssemblyBuilder:get_status()
    201. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    202. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    203. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    204. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    205. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    206. UnityEditor.EditorApplication:EnterPlaymode()
    207. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    208. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    209. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    210. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    211. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    212. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    213. UnityEditor.Compilation.AssemblyBuilder:get_status()
    214. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    215. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    216. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    217. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    218. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    219. UnityEditor.EditorApplication:EnterPlaymode()
    220. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    221. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    222. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    223. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    224. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    225. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    226. UnityEditor.Compilation.AssemblyBuilder:get_status()
    227. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    228. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    229. (Filename: Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs Line: 71)
    230.  
    231. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    232. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    233. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    234. UnityEngine.Logger:Log(LogType, Object)
    235. UnityEngine.Debug:Log(Object)
    236. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:71)
    237. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    238. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    239. UnityEditor.EditorApplication:EnterPlaymode()
    240. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    241. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    242. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    243. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    244. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    245. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    246. UnityEditor.Compilation.AssemblyBuilder:get_status()
    247. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    248. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    249. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    250. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    251. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    252. UnityEditor.EditorApplication:EnterPlaymode()
    253. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    254. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    255. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    256. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    257. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    258. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    259. UnityEditor.Compilation.AssemblyBuilder:get_status()
    260. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    261. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    262. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    263. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    264. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    265. UnityEditor.EditorApplication:EnterPlaymode()
    266. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    267. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    268. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    269. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    270. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    271. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    272. UnityEditor.Compilation.AssemblyBuilder:get_status()
    273. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    274. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    275. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    276. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    277. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    278. UnityEditor.EditorApplication:EnterPlaymode()
    279. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    280. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    281. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    282. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    283. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    284. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    285. UnityEditor.Compilation.AssemblyBuilder:get_status()
    286. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    287. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    288. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    289. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    290. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    291. UnityEditor.EditorApplication:EnterPlaymode()
    292. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    293. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    294. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    295. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    296. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    297. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    298. UnityEditor.Compilation.AssemblyBuilder:get_status()
    299. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    300. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    301. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:OnPlayModeStateChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:73)
    302. UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
    303. UnityEditor.EditorApplication:set_isPlaying(Boolean)
    304. UnityEditor.EditorApplication:EnterPlaymode()
    305. UnityEditor.AI.Planner.CodeGen.<>c:<OnPlayModeStateChanged>b__10_2(Object) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:74)
    306. UnityEditor.Compilation.<>c:<SubscribeToEvents>b__16_1(Object)
    307. UnityEditor.Scripting.ScriptCompilation.EditorCompilation:InvokeCompilationFinished(Object)
    308. UnityEditor.Compilation.<>c__DisplayClass53_0:<Build>b__1(Object)
    309. UnityEditor.Scripting.ScriptCompilation.CompilationTask:HandleOnCompilationTaskFinished()
    310. UnityEditor.Scripting.ScriptCompilation.CompilationTask:Poll()
    311. UnityEditor.Compilation.AssemblyBuilder:get_status()
    312. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:BuildAssembly(String[], String, String[], String[], String[]) (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:266)
    313. UnityEditor.AI.Planner.CodeGen.PlannerAssemblyBuilder:Build() (at Library\PackageCache\com.unity.ai.planner@0.2.1-preview.3\Editor\CodeGen\PlannerAssemblyBuilder.cs:102)
    314. (Filename: Library/PackageCache/com.unity.ai.planner@0.2.1-preview.3/Editor/CodeGen/PlannerAssemblyBuilder.cs Line: 71)
    315.  
    316. Rebuilding AI Planner assemblies because Assets/AI.Planner/Actions/EatAction.asset is newer
    317. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    318. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
     
  42. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    We've run into a few issues like this when renaming parameters, assets, etc. We're hoping to add some minimal asset validation in a future release.
     
    PaulUsul likes this.
  43. Delphic_

    Delphic_

    Joined:
    Apr 23, 2018
    Posts:
    39
    Hi i get the same error as JuaniHoi on my Mac.
    Looking forward for a fix soon! :)
    I love this project keep it up !
     
  44. eugolana

    eugolana

    Joined:
    Mar 27, 2019
    Posts:
    6
    This feels like a stupid question, but I can't manage to update the traits n the world state.

    I have a trait 'PlantStatus' with a field 'GrowthLevel', which I want to ++ as the plant grows, so my agent is aware when it can be harvested.

    If I set 'Next State Update' to 'Use Next Plan State' then the agent 'knows' which traits were changed in the previous steps of the plan, but traits in the world state don't update.

    Am I going about things completely the wrong way, or am I just missing something? I have been looking through the samples, but they seem to rely on the 'next plan state' (ie. in Escape Room'), or wholesale deleting the object with the traits (in the Vacuum demo, as well as the walk-through)

    Thanks, and great work with this project. I am really excited to get it working i my project!
     
    Last edited: Jan 14, 2020
  45. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    It is interesting to see that you thought it would update the world state. I'm wondering now how to clarify this in our UI. The 'Next State Update' is for updating the state in the planner and not the other way around from the planner to the world state. I think this is what you were expecting. The idea here is that if there isn't any way for the world state to change in ways that would disrupt the next action of the planner and that it will match what the planner's next expected state would be, then you could just continue. Otherwise, the other option of updating with the world state is available.

    The action callback you take in the world should adjust the TraitComponent data for the trait the same way the planner action effects expect it to.
     
    eugolana likes this.
  46. eugolana

    eugolana

    Joined:
    Mar 27, 2019
    Posts:
    6
    Thanks for your response.

    This all makes sense. It wasn't so much that I expected 'next state update' to update the world state,but that I couldn't find examples of the TraitComponent being updated directly. I finally figured it out. It would be nice if there was a simple exmaple amongst the samples that shows this. I think a couple of renaming-issues were actually complicating my efforts.
     
    TrevorUnity likes this.
  47. PaulUsul

    PaulUsul

    Joined:
    Nov 20, 2012
    Posts:
    29
    hey, does anyone have it working with any ecs systems? following the step by step guide and having a ecs system, the system stops the second after an agent is enabled.

    Here's a video, I feel like I'm taking crazy pills here. (ignore the end package manager doesn't show up)
    https://drive.google.com/open?id=1flx6vg1Hm7dhcrHeamzmFITn8Xl5thf8

    try to disable the agent.
    press play, see that all systems work.
    enable agent, everything stops.

    Code (CSharp):
    1.  
    2. using Unity.Entities;
    3. using Unity.Jobs;
    4. using UnityEngine;
    5.  
    6. public class ExampleSystem : JobComponentSystem
    7. {
    8.     protected override void OnCreate()
    9.     {
    10.         base.OnCreate();
    11.         Debug.Log("OnCreate");
    12.         Application.targetFrameRate = 1;
    13.     }
    14.  
    15.     protected override JobHandle OnUpdate(JobHandle inputDeps)
    16.     {
    17.         Debug.Log($"{Time.frameCount} OnUpdate");
    18.         return inputDeps;
    19.     }
    20. }
    21.  
     
  48. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    118
    It seems when we initialize the plan executor, we inadvertently reset the PlayerLoop. The culprit is line 203 of the BasePlanExecutor, which should read

    Code (CSharp):
    1. ScriptBehaviourUpdateOrder.UpdatePlayerLoop(world, ScriptBehaviourUpdateOrder.CurrentPlayerLoop);
    I've fixed this now in our development repository. Great catch, @PaulUsul!
     
  49. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    0.2.2-preview.1 is now up, which is a small bug-fix release:
    * Fix filepath concatenation when generating code. (for the MacOS folks)
    * Fix loss of existing player loop when initializing the plan executor. (@PaulUsul)
     
    PaulUsul, JuaniHoi, Delphic_ and 2 others like this.
  50. sordidlist

    sordidlist

    Joined:
    Sep 2, 2012
    Posts:
    86
    Hey all. I ended up with some time to circle back to AI Planner and I'm having trouble finding the newest version, 0.2.2-preview.1.
    I'm using 2019.2.19.f and it says the latest version is 0.1.1. I tried refreshing the package in package manager and get the same thing. I may have missed it in another comment - do the latest versions require the beta version of Unity? Thank you!