Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

ICode (AI For Mecanim 2.0)

Discussion in 'Assets and Asset Store' started by DevionGames, Dec 18, 2013.

  1. rokitkrk10

    rokitkrk10

    Joined:
    Jul 21, 2014
    Posts:
    4
  2. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    There is currently no support for this package.
     
  3. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,099
    The latest Behavior Designer release completes the integration between AI For Mecanim and Behavior Designer. About a week ago Zerano released an update to AI For Mecanim which allows you to start and stop a behavior tree from within AI For Mecanim, and the latest version of Behavior Designer allows you to start and stop a state machine from within Behavior Designer. The integration documentation is located here and there is a sample project available which shows the integration.

    This is an image from the sample project. In the sample project, the robot will patrol a path by using AI For Mecanim's state machine. The robot has a large sphere trigger and when the red sphere enters that trigger the behavior tree will stop the active state machine. A new state machine will run which moves the robot towards the sphere. After the robot is done moving towards the sphere it will continue on its patrol path.
     
  4. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    For some reason these videos cause loading problems for me where I am located. I have to turn on VPN to view this page now. And it's not like youtube is blocked here (malaysia). Freaking crazy internet.
     
  5. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Zerano, do you plan on adding support for Apex Path... It's just that its on sale now and I would purchase it now if there is a chance you will support it in the near future..

    Thanks!
     
  6. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Yes i am already working on it. Still trying to figure out what is the best way to update a position.
     
  7. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I have faith in you Zerano... your the man!
     
  8. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    If you bought Apex Path, there is now a support package for it, that you can try out. You can use them the same way as NavMeshAgent actions(Wander, Seek, MoveTo...).

    Asset Store Reviews
    I know it is time-comsuming to go into the asset store and click on the rating system and write a small review. But the rating system helps the developer and the customer. It helps the developer to generate sales and improve his asset, he does not loose interest to extend and improve his product if the sales are good. On the other hand it also helps you as customers. I think it is also in your interest to get a great, bug free and advanced system.
    This all can only happen, if we work together. If you like the asset, please go into the asset store and review it, if you do not like it, post your suggestions on the forums or by email. Please be fair and give the developer the chance to improve his product, before giving a negative review and also recheck and correct your review if there was an issue that has been fixed already.

    My package was downloaded over 2500 times and got only 143 ratings with only 29 written reviews, i think there is a lot place for improvements.

    Thanks!
     
  9. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Yep, I went ahead and bought it, from previous post I saw that you are a man of your word, I also wrote a review and rated your product focusing on service provided.

    Thanks again Zerano, your service is what sold it for me.
     
  10. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    Hi there,

    i considering buying your asset. I just have some questions and maybe the community can help me on this. I will use Behavior Designer to develop some kinds of my AI, but I think an FSM could help me on this. I already own PlayMaker, which is nice but i never got really deep into it. I wanted to ask about the differences or advantages between AI for Mecanim and Playmaker. Maybe some Community Member could also help on this.

    Are there some coder out there who already wrote custom Tasks (if it is possible)?

    Thanks a lot!
    Cheers
     
  11. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Not understanding what you are asking there red2blue.
    Can you be a little more specific since Playmaker is a visual scripting asset and AI for Mecanim is there to control your AI.
     
  12. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    Hi Archania.
    Thanks for your answere!

    I was asking because both systems are FSM's, and with both I can build up an AI. I would like to know, what are the specifics about AI for Mecanim which are above a normal FSM.
    I am able to control a lot of game mechanics with an FSM like Playmaker (Some people build up the whole logic of a game). Since I don't want to buy the same system twice, I would like to know from people who are aware of both systems, what are the differences and maybe advantages of AI for Mecanim. Like what you mentioned, the control of the Mecanim animation.

    Hope you understand what I mean.

    Thanks!
     
  13. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Review written! Sorry I didn't do that before. I meant to, but never go around to it. I also added my desires at the end which include Climbing up/down, jumping across/over/up (like a big jump on something)/down (big jump down something), and swimming.
     
  14. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hello,
    I just wanted to say that I am currently on my holidays, when i am back the support will be regular again.
    Sorry for any circumstances!
     
  15. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Would it be hard to make AI bot vehicles that move like the ones in the game Indestructible? Basically the bot cars follow you around but don't drive directly at you... they don't try to ram you; they usually drive past you and drive circles around you, and back up when they hit a wall.

    If this sort of AI is possible, could you make a tutorial or video outlining the process? Here's some example gameplay of the sort of AI I want (probably better to play the actual game, but this will give you an idea):



    I own A* Pathfinding Project and Apex Path already if those assets are needed to implement such an AI. Thanks!
     
    Last edited: Aug 18, 2014
  16. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    How are we supposed to get a transform reference in a variable ?
    and how can i set the transform.parent to null ?

    its like actually this two simple actions are not possible
     
  17. RainGames_Baste

    RainGames_Baste

    Joined:
    Aug 8, 2014
    Posts:
    2
    I've been using the system for a while now, and it's working out pretty great! The core set of both actions and conditions are kinda limited, but it's super easy to add custom ones, so that hasn't been a big problem. I've got a couple of feedback points for you, Zerano:

    The condition GetFloat is really poorly named. It compares floats, and should be named CompareFloat, not GetFloat. Took me a while to figure out where the float comparison condition were.

    The same condition is severely lacking in comparers. Lesser and Greater is not enough. I implemented Equal, Unequal, LessOrEqual and GreaterOrEqual myself, but that should be core features. By the way, Equal and Unequal should probably use Mathf.Approximately, not ==.

    An action that calls functions on the scripts would be nice. Similar to the GetParameter action, being able to specify a script name and select methods from a drop down would make script/ai interaction a lot easier when the AI system is not enough on its own. A solution where you can call void methods that takes no arguments should be pretty easy to implement as well.

    You should also probably get a native english speaker to look over your code - there's some instances of variables having a bit confusing names, in addition to typos. Code documentation would also be nice, in addition to a tutorial on how to write custom actions and conditions.

    And with regards to:
    The Parent action is confusing - the way I see it, it should set the parent of the attached object, but the behaviour is to set the attached object as the parent of some other object. So after executing it, GameObject is the parent of Target. A good solution would be to have two actions - one named AddChild which adds a child to the attached object (how the Parent action works now), and one named SetParent that sets the parent of the attached object (and accepts null as a parameter to unparent the object).


    I've really been enjoying working with your product for now, and I'll be sure to throw in a positive review!
     
    red2blue likes this.
  18. RainGames_Baste

    RainGames_Baste

    Joined:
    Aug 8, 2014
    Posts:
    2
    One final thing I've been missing - a way to turn off the state labels.

    In the editor window, each object with a state machine behaviour has a label showing which state it is currently in, and I can't for the life of me figure out how to turn those off. Is this possible? It would be really nice to be able to set that on a behaviour-to-behaviour basis, to only show the labels on one of the objects.
     
  19. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Yes it should be possible.

    Thanks i am going to implement this.

    Big thanks for all the suggestions! You will see them soon implemented.
     
  20. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    This is currently not possible, but a great idea.
     
  21. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    Hi Zerano,

    Can you please point me to some documentation regarding how to set sounds for different actions? (different melee attacks, run, idle, chasing, spotting sounds etc..)

    Please help me out,
    Ty
     
  22. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Do you want to play a special sound when in xy state? If yes, just use Audio.SetAudioClip and afterwards Audio.Play
     
  23. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    For example I play the attack animation or the walk animation, I need to also play the sounds (attack and footstep sounds). This is the way to do it? If so, I add this in the same state machine or I do it by script?
     
  24. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    You can add the Audio.Play action to the same state where you play the animation.
     
  25. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.4
    • Fixed Transform.Parent action
    • Added MonoBehaviour.Invoke
    • Changed GetFloat, GetInt, GetBool condition names to CompareFloat, CompareInt, CompareBool
    • Turn on/off debug label
    • Scroll for local parameters
    • Apex Path 1.2 fix
     
  26. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    Hi Zerano

    2 things:
    1. Is it ok to upgrade from 1.3.2b to 1.5.3? I didn't do any changes to the package, but this upgrade will screw my current state machines?
    2. I bought this from your website. There the package is still 1.5.3 instead of 1.5.4. Can I do something to also have access on asset store for your package?

    Ty
     
  27. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Could you please ask your questions in the forums next time.

    1.There was a few refactoring, so i wrote a tool to fix the refactoring. Please follow the update instructions included in the package. You should backup your project.

    2. I just updated my websites version to 1.5.4a. I think there is no way to get access to the asset store version.
     
  28. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    Ah sorry. I've read in the documentation that any question should be asked in the forums and since I didn't knew about those, I asked in 'these' forums. I will check, thanks!
     
  29. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.5
    • More audio actions.
    • Unity GUI Beta(Usable only with unity 4.6)
    • RenderSettings actions
    • Material actions
    • More camera actions
    • More Mathf actions
    • More Rigidbody actions
     
  30. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Don't panic if you upgrade to the latest version and can not find actions and third party integrations. They can be downloaded here now!
     
  31. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Thanks for the great work Zerano!
     
  32. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.6
    • Improved UFPS Example
    • A few actions accept optional a gameObject as target position now(SetDestination,Instantiate,SetIKPosition...)
    • Added randomization actions( InstantiateRandom, PlayRandom(Sound), SetRandomMaterial...)
    • Improved state machine selection when switching to playmode.
    • Moved Third Party Integrations to http://zerano-unity3d.com/AIDocumentation/navigation/add-ons/
    • Moved not commonly used actions to http://zerano-unity3d.com/AIDocumentation/navigation/add-ons/
    • Time actions
    • OnUnityEvent condition handles all Trigger,Collision and Mouse messages.
    • Zoom to Default State/Any State, when opening the state machine.
    • More string actions.
    • String actions have their own category.
    • List actions(Currently with error when adding the action without side effects) ListTest.unitypackage
    • More actions for A* Pathfinding project, still a few to add.
     
    Last edited: Sep 2, 2014
  33. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.7
    • BroadcastMessage accepts parameters similiar to SendMessage
    • GameObject.Find can find optional inactive GameObjects
    • AI For Mecanim logo on Hierarchy items with StateMachineBehaviour
    • Easy Touch Support can be downloaded at http://zerano-unity3d.com/AIDocumentation/navigation/add-ons/
    • OffMeshLink actions
    • Updated Follow scene in default examples with jumping.
    • Fixed: Binded state machines reseted GameObject parameter to owner
    • GameObject.Distance, second GameObject is optional now
    Thank you very much for the review amount in the last time, i really appreciate it!
     
    Last edited: Sep 2, 2014
  34. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.8
    • Mute/Unmute transitions
    • GetProperty and SetProperty accepts Lists now.
    • Visual Tween editor and state machine actions.
    Visual Tween
    Visual Tween is currently in beta and is located in the Extras folder of the AI For Mecanim package. Importing Visual Tween will also import the actions for the state machine, so you can Play, Stop, Pause, Restart the sequence form your state machines.




    Please checkout this "Getting Started" video:
     
    hopeful likes this.
  35. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Looks awesome zerano!
     
  36. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Yes truly awesome... Zerano can you use your arrow keys to nudge the tweens and also trim the ends... Also can I select multiple tweens or end points and trim or nudge as well?
     
  37. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Great idea!
     
  38. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Thanks, video editor by trade, also will this be frame based? 24,25,30 fps? Will you be able to choose?
     
  39. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I do not want to promise a lot, since visual tween is a simple extension and not the main asset. However this would be pretty easy to implement. I still need to improve the main asset AI For Mecanim to get an average of 5 stars in the asset store ;)
     
  40. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    LOL... yeah I know... that's the only things I saw right off the bat that would make this extension a killer asset to AI for Mecanim.

    Timing is a must when it comes to tweening especially when your matching animations and frame accuracy is a must IMHO...

    EDIT: Snapping on/off would be a great thing as well...

    Thanks for your great work and dedication to this asset and the Unity community.

    It is noticed...
     
    hopeful likes this.
  41. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.9
    • New state machines are starting at the center of the canvas scroll
    • Scroll to the center of states
    • Shortcuts
    • Improved ReorderableList drag
    • Enabled multi state dragging.
    • Or - transitions are now shown with three arrows(Multiple transitions to same state)
    • Fixed transition mute color
    • Groups for GlobalParameterEditor.
     
  42. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Great, thanks for the update. One thing. I'm using light unity skin. When selecting the transitions in the inspector, it doesn't show which transition has been selected.

    Another thing:
    Adding/Deleting conditions to the transitions using the inspector still has bugs. While adding/removing and selecting different transitions, I got these errors:

    Edit: I did another test, these errors also occur when clicking on and dragging a transition item in the inspector.

    --------------
    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[StateMachine.StateTransition].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    System.Collections.Generic.List`1[StateMachine.StateTransition].System.Collections.IList.get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:739)
    ListExtensions.MoveTo (IList list, Int32 oldIndex, Int32 newIndex) (at Assets/State Machine/Scripts/Editor/ListExtensions.cs:47)
    ReorderableList.DoListItems () (at Assets/State Machine/Scripts/Editor/ReorderableList.cs:171)
    ReorderableList.DoList () (at Assets/State Machine/Scripts/Editor/ReorderableList.cs:55)
    StateMachine.StateInspector.OnInspectorGUI () (at Assets/State Machine/Scripts/Editor/StateInspector.cs:51)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty)
    UnityEditor.DockArea:OnGUI()

    --------------------------------
    ArgumentException: Getting control 5's position in a group with only 5 controls when doing mouseDrag
    Aborting
    UnityEngine.GUILayoutGroup.GetNext ()
    UnityEngine.GUILayoutUtility.DoGetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
    UnityEngine.GUILayoutUtility.GetRect (Single width, Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
    UnityEngine.GUILayout.Space (Single pixels)
    StateMachine.StateInspector.OnInspectorGUI () (at Assets/State Machine/Scripts/Editor/StateInspector.cs:52)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty)
    UnityEditor.DockArea:OnGUI()
     
    Last edited: Sep 14, 2014
  43. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Fixed, transitions should not be draggable.
     
  44. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Nice, btw, I'm on a MacBookPro. What are the equivalent shortcut keys for a mac. Ctrl+Click Canvas, Ctrl+Click State, Ctrl, Alt ?
     
  45. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    1. With the latest transition dragging fix. When there is only one transition, dragging it makes the entire Transition bar and Condition bar disappears.

    2. Also I'm using light skin in Unity Pro and when selecting the transition, it does not highlight the selected transition in the inspector which makes it very difficult to know which transition to add conditions to.

     
    Last edited: Sep 17, 2014
  46. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.6.0
    • Fixed bug when dragging transitions
    • Improved selection of states using Ctrl for selecting/deselecting
    • StateAction and StateCondition inherit from base class Node
    • Changed property name disabled in StateAction and StateCondition to enabled
    • Improved editor and inspector performance
    • Copy/Paste states including other state machines
    • Changed shortcuts because of the new selection using Ctrl
    • Mouse instruction when making a transition using shortcut
    • Added statistic info
    • More functionality in action/condition settings(Enable/Disable, Find Script/Edit Script, Copy/Paste/Paste After/Paste Before/Replace,Remove)
    • Lock option when selecting hierarchy game objects
    • Create State Machine is now in child menu of selecting state machine menu
    • Undo/redo
    • Editor code cleanup(still requires work)
    • Better visualization when an action or condition is enabled/disabled
    • Improved dragging of actions and conditions
    • Custom Inspector Beta
    • When binding a state machine, it will be loaded into the editor.
    There were a few changes in this version, so i really recommend to make a backup. Please remove also the State Machine folder before importing the new version. As always please post any bugs or recommendations on the forums. If you are using Addons, they also require an update.
     
  47. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Thanks for the update.
    dragging transitions bug seems to be fixed.

    Not fixed: "2. Also I'm using light skin in Unity Pro and when selecting the transition, it does not highlight the selected transition in the inspector which makes it very difficult to know which transition to add conditions to."

    https://dl.dropboxusercontent.com/u/48378123/AIInspectorLightSkin.mp4
     
  48. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Thank you i will take a look at it today.
     
  49. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,524
    Hey Zerano.

    I purchased this asset a while ago but have not truly dug into it. Wanted to ask. Is there a way to make a behavior and have it work without the AI Mecanim folder?

    I want to make a bird and fish behavior and include it with my asset store package. Would this be possible without including any of your asset?
     
  50. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, you can make your AI state machine with the system and then when you submit it to the asset store just delete the State Machine folder. But if the user wants to use your AI, he would need to buy and import AI For Mecanim. There are many plugins on the asset store doing this. However you should say in the description that AI For Mecanim is required to run the example scene. You are even welcome to sell your state machines on its own as long as the AI For Mecanim code is not included.

    I have done this myself for NGUI: https://www.assetstore.unity3d.com/en/#!/content/16279