Recent content by xjjon

  1. X

    Combine Sequence + Success

    Thanks, that worked very well. It was unclear to me when I last looked at it as I had not looked at the Runtime Source. Now it's very clear. Here's the snippet if anyone stumbles upon the same question: Note the `ChildStatusAlwaysTrue` flag and changes in Decorate and OnChildExecuted...
  2. X

    Poor performance

    To see all the individual calls you need to enable "deep profile" option in the profiler window. It's one of the buttons on the top bar of the profiler Looks like there are 1921 instances of memory allocation in your update (using 0.07ms) but that doesn't add up to the remaining 2.2ms~ Once...
  3. X

    Poor performance

    If you expand it further you'll be able to see which task is using up the most time. Yours seems high for 50 enemies. Also if it is creating 45kb GC per frame it might be worth investigating. As you can see in mine there is 1 Shoot Task 1 Movement Task 2 Follow Task -- As a general...
  4. X

    Poor performance

    You need to show more of the profiler. How much ms per frame does it take? If you use deep profiling you'll see which tasks are problematic. Post a breakdown of the call stack I've done extensive testing and profiling on behavior designer performance vs other alternatives (such as node canvas)...
  5. X

    Are there any guidelines for designing trees?

    Doesn't only apply to Behavior Designer but here is a good GDC talk about designing effective behavior trees
  6. X

    Performance issue when loading behaviour tree

    So I did some testing in this area (to try and avoid multiple de-serializations when instantiating the same prefab). My use case was when warming up the pool the majority of the time was spent de-serializing the JSON. Using reflection to do deep copy is slow especially for tasks with nested...
  7. X

    Null value for task field

    Upon more testing (looking at the json serialization), it's just the default drawer that will always draw the fields (even if the object is null) However, once you set one of the fields, it will serialize (but there's no way to set it back to null in the default inspector). Is that correct? So...
  8. X

    Null value for task field

    How can I get a task field to be null? It's always initialized/serialized by default. class MyTask : Task { public SomeClass MyField; // I want this to be null by default } class SomeClass { public int Value; } On a side note, it would be amazing if the behavior designer inspector...
  9. X

    Combine Sequence + Success

    Hi, I'm trying to implement a combined sequence (Composite) that always return success. I frequently use this pattern and would like to combine it into 1 node. public override void OnChildExecuted(TaskStatus childStatus) { // Increase the child index and update...
  10. X

    [TaskTitle] Attribute

    Would love to see a [TaskTitle("CustomTitle")] Attribute. We name our task classes in the following format <Name>Task to make it clear these are Tasks for behavior designer. Works fine for most cases but some tasks end up being very long in the behavior tree UI.
  11. X

    Conditional transition to another part of the tree

    Ah yes you are right - each time I tried before I was closing the "behavior designer" window before opening it for another prefab. It works as expected if I keep the window open while opening another prefab. Thanks again
  12. X

    Conditional transition to another part of the tree

    Thanks. One more question - is it possible to copy and paste tasks between different trees? Tried to do it but only seem to be able to paste within the same tree. If not - is this something that would be possible? From the json serialization it seems it would be possible - although the root ID...
  13. X

    Conditional transition to another part of the tree

    Hi, I am trying to implement behavior for a 'rage mode' part of a boss. That is basically a set of behaviors that the boss transitions to after certain conditions (hp is lower than X, etc) The trouble I am having is having that condition checked after each spell is completed and then if true...
  14. X

    Random Chance to Execute Sequence

    Hi I have a task in a sequence that I want a random chance to execute. If it doesn't execute, I still want the rest of the sequence to run. How can I do that? For example On Loop: Walk - [50% chance to Dance] - Walk - Run
  15. X

    Run a task async?

    Yeah that is what I am doing now - but it is very verbose in the behavior tree. See example below: * Radial Damage Task is the spell (which keeps track of duration and returns Running as long as it's active) This will basically do the following Starting from the red arrow: [Parallel] 1)...
Top