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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

ICode (AI For Mecanim 2.0)

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

  1. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    In PlayMaker you have a itween integrated. Its quite handy and i use it often. Is there something similar integrated in iCode?
     
  2. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Only some simple custom tweens right now. I will integrate itween for next update.
     
  3. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Ok, good to know ! Some tween-machines are out there, you can integrate them by yourself, but i am lazy and prefer the all-in-one como package :). I have PlayMaker with iTween, but there are also other tween-machines out there, like Ltween, or so that promises you that they are faster than the iTween solution. Anyway, nice to hear you can implement it in a next update. Your iCode Plugin looks clean ! I like that. A problem i have with nodebased PlayMaker, is that it gets unclear if your game gets more complex.

    I tried Nodyfy2 (open source), what is more clear, if your project get complex. Maybe you can get some inspiration from there;). I like your video-tuts. Not to long and you see how it works. Very important, i would say !
     
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    DOTween seems to be generally favored over iTween these days. Perhaps you could look into implementing that instead of iTween?
     
  5. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    165
    Hi, anyone know how I can create a simple trigger event using icode? I’m trying to just have an empty game object that the player collides with and upon collision an audio file plays.
     
  6. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    When I rername variables, the references in the script gets lost. Is this intended?
     
  7. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, do you mean the reference in the action/condition is lost? This should not happen.
     
  8. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Yes, happening.
     
  9. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Thanks going to check this.
     
  10. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    Hi Zerano. I have a trouble why Variable.SynchronizeVariable doesn't work.
    I want to hand over from a float Health variable of group value "0" Icodebehaivior to a Health float variable of group value "1" Icodebehaivior. They are attached on same gameobject.
    State of group value "1" has the SynchronizeVariable action.
    (parametor: GameObject=Owner, Group=0, Variable=Health, ParameterType=FsmFloat, Store=Health)
     
  11. NaumanShah

    NaumanShah

    Joined:
    Jun 2, 2015
    Posts:
    3
    Hi Zerano,
    I am getting this error

    StackOverflowException
    UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) (at C:/buildslave/unity/build/artifacts/EditorGenerated/UnityEngineObject.cs:49)
    UnityEngine.Object.op_Equality (UnityEngine.Object x, UnityEngine.Object y) (at C:/buildslave/unity/build/artifacts/EditorGenerated/UnityEngineObject.cs:160)
    ICode.FSMEditor.ErrorChecker.CheckForErrors (UnityEngine.Object targetObject) (at Assets/ICode/Scripts/Editor/ErrorChecker.cs:29)
    ICode.FSMEditor.ErrorChecker.CheckForErrors (UnityEngine.Object targetObject) (at Assets/ICode/Scripts/Editor/ErrorChecker.cs:55)
    ICode.FSMEditor.ErrorChecker.CheckForErrors (UnityEngine.Object targetObject) (at Assets/ICode/Scripts/Editor/ErrorChecker.cs:55)
    ICode.FSMEditor.ErrorChecker.CheckForErrors (UnityEngine.Object targetObject) (at Assets/ICode/Scripts/Editor/ErrorChecker.cs:55)
    ICode.FSMEditor.ErrorChecker.CheckForErrors (UnityEngine.Object targetObject) (at Assets/ICode/Scripts/Editor/ErrorChecker.cs:55)
     
  12. NaumanShah

    NaumanShah

    Joined:
    Jun 2, 2015
    Posts:
    3
    This happens when i rename my scripts for custom actions and conditions
     
  13. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    What does Bind to GameObject do? When I share a state machine with inspector, when I change a variable, other instances are changed as well. It is not local to the instance. Is that intended?
     
  14. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Bind to GameObject means, you bind the state machine to the scene gameobject. You can then make references to the scene(Drag and Drop GameObject's from the scene to variables directly, without using "Find"). You do not share the state machine at all. You can't reuse the state machine. You also can't make a prefab of it. The big advantage of this feature is, that it is more performance friendly, you don't need to search for gameobjects and use them directly as reference.
     
  15. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    A few new updates from my last post about updates here.

    2.0.7b
    • Execute node at runtime for debugging(context click)
    • Improved Error Console(Select States with errors)
    • Error icon in hierarchy, if fsm has errors.
    • Canvas Zoom - Fsm Tool -> Select existing FSM's in project or scene
    • DragAndDrop support for FSM assets(copy/paste by drag and drop)
    • Added MonoBehavior Converter and Welcome Screen to tools menu
    • Added Tools documentation(http://zerano-unity3d.com/AIDocumentation/navigation/user-interface/tools/)
    2.0.7a
    • Selectable transition lines
    • Fixed line shader warning.
    • Fixed unity 5 SetFixedAngle warning.
    2.0.7
    • Changed style of action, transition and condition list.
    • Added selection makers for action, transittion and condition.
    • Fixed reset, when removing condition/transition.
    • Added error icon on duplicate variable names.
    • Added error icon for hierarchy, if FSM has errors.
    • Added error icon if transition has errors.
    • Instruction if variables are not expanded
    • UNet actions and conditions(Not Finished!)
    • Changed DefaultValue to DefaultValueAttribute
    • Node Context to move nodes to SubStateMachine.
    • Node Context to move nodes to ParentStateMachine.
    • Click to create variable in inspector if missing
    • Auto assign Owner as default for SharedPersistant FsmGameObject
    • QualitySettings actions
    2.0.6
    • SetAnimationClip action for mecanim.
    • Fixed Translate action without deltaTime.
    • SetProperty was not recognizing Transform as Object
    • RectTransform actions
    • Changing variable name does not reset reference in action/condition
    • GameObject for OverrideVariables
    • Fixed changing variables in inspector
    • Fixed Debug.DrawLine/DrawRay SharedPersistant attribute was missing.
    • Fixed NavMeshAgent Stop for unity 5, stops immediately when stopUpdates is set to true.
    • Changed unity_5 version checks to support all unity 5 versions.
    • New Addon: DOTween
    • New Addon: Energy Bar Toolkit
    • Updated Addon: Photon Cloud to v1.58
     
  16. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi All,
    I am starting with ICode and I imported its unitypackage in Unity 5.0.1f and I get the following error

    Assets/ICode/Scripts/Runtime/Actions/Networking/FsmVariableMessage.cs(3,19): error CS0234: The type or namespace name `Networking' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
    For it, Could anybody to help me to fix it?
    Thanks in advance
    Castana1962
     
  17. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi All
    Please do not worry, I fixed the problem. I imported the unitypackage to Unity 5.1 and I works fine
    Thanks anyway
     
  18. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi All,
    I have the following error
    Assets/RPG/ICode/Scripts/Runtime/Conditions/GUI/OnEventTrigger.cs(26,33): error CS1061: Type `UnityEngine.EventSystems.EventTrigger' does not contain a definition for `triggers' and no extension method `triggers' of type `UnityEngine.EventSystems.EventTrigger' could be found (are you missing a using directive or an assembly reference?)
    For it, Could anybody help me to fix it?
    Thanks
    Castana1962
     
  19. thomokon2014

    thomokon2014

    Joined:
    Oct 13, 2014
    Posts:
    14
  20. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hello, the site has instructions. Just open the Integrations window from the unity toolbar Window/Zerano Assets/ICode/Integrations and enable the A* Pathfinding Project. You do not need to download anything now. It is all integrated and just needs to be enabled.
     
    hopeful likes this.
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    BTW, glad to see some integration of Photon Bolt is happening. :)
     
  22. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    2.0.9
    • Fixed Gradient effect for unity 5.2
    • Fixed Rigidbody2D.SetConstraints
    • Fixed Unity Networking conditions
    • MySQL integration
    • Implemented CallbackHandler
    • Moved Toolbar menu to Tools/Unitycoding/ICode/...
    • Added FsmTool to toolbar
    • Review Reminder
    Third Party Integrations

    Photon Bolt
    • Started Integration
    • SetPropertyDynamic/GetPropertyDynamic
    • SetAnimator
    • SetTransforms
    Energy Bar Toolkit
    • Actions were missing [System.Serializable]
    Highlighting System
    • Added full Support

    Photon Unity Networking 1.0.1a
    • Removed BaseModule from photon and implemented CallbackHandler from ICode instead
    • Added missing namespaces
     
  23. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    2.1.0
    • Moved ICode folder to Unitycoding/ICode
    • Removed AssetCreator, using AssetCreator from Unitycoding/Shared scripts
    • Added Tools menu to Tools/Unitycoding/ICode/Tools
    • Preview actions/conditions in browser without editor opened
    • Added component menu to Tools/Unitycoding/ICode/Components/...
    • Fixed zoom, if active state machine is null
    • Fixed shortcut gui offset if active state machine is null
    • Disabled variable create button(+) if active state machine is null
    • Added canvas context menu to create a state machine when active is null
    • Added instructions if active fsm is null
    • Changed GlobalVariables assets path to Assets/Resources/. Can be moved by user to a sub Resources folder
    • Moved Documentation to http://zerano-unity3d.com/docs/home/icode/
    • Adjusted new documentation paths in editor
    • Added delay for review reminder popup
    • Update examples location folder Unitycoding/ICode/Examples
     
  24. TechiTech

    TechiTech

    Joined:
    Dec 13, 2014
    Posts:
    212
    Hey Zerano!! being a big fan of your work I was wondering it you had plans to somehow link ICode with vehicle physics plugins like eddy's or iTs traffic?

    Or even make a separate package? I would buy it.. similar to Icode though :)

    Thanks mate
     
    DevionGames likes this.
  25. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, i am currently working on the rpg kit update and it could take some time.
     
  26. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    Hi Zerano,

    Did not find a doc article on migrating existing state machines from "AI for Mechanim" to "ICode". Is it possible? If yes, can you give a few hints?

    Thanks beforehand.
     
  27. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Hi,

    I have recently purchased ICode and I must say I'm very happy with it, it's very intuitive, flexible and highly extensible.

    I just come with a question: what is the benefit of using Behavior Designer along with ICode ?
     
    Ramsdal likes this.
  28. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Yeah I have not gotten so far in my AI process yet myself, but I have both plugins as well. A little about State Machines versus Behavior Trees is written on Opasives webpage (http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=49) - They complement each other very well he seems to say.

    However I would think it to be overkill for smaller games? I would also like to hear Zerano's point of view here. Currently I am only using ICode in my project, but the real AI development has not begun yet either.
     
    jimmikaelkael likes this.
  29. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    Thank you very much for that link @Ramsdal it's very useful!

    Well I think the final sentence sum up things pretty well:
    What I currently have as an AI for my mecanim could be called a "pursue" function (currently it seeks for target, using the nav mesh to find the proper path and attack/take damages).
    I could have another function called "wander" for example, but where I'm lost is that this function would need to handle damages too, hence there will be some redundancy...

    Would be great if someone who has already used Behavior Designer with ICode could tell us more about advantages it gives. I'd be glad to hear too what @Zerano would say about it.
     
    Ramsdal likes this.
  30. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,093
    Behavior Designer dev here -

    The link @Ramsdal mentioned is perfect for this conversation. I would also take a look at the Playmaker sample project video to give you an idea of how behavior trees and FSMs can work together. The ICode integration works the same was as the Playmaker integration.

    It could be, but it also depends on what you want to do. If you only want your AI to seek and perform some action (such as an attack) after the character gets done seeking then behavior trees would be overkill. However, what if you want to add more to it, such as handing if the AI gets damaged while seeking, or runs out of ammo when while attacking. This is where behavior trees combined with FSMs can be beneficial even for a smaller game.

    We have another asset called the Third Person Controller and with that I created a relatively complex behavior tree. This tree covers most of what you mentioned and I wrote about how it works on this page. If you were to combine this with ICode you could replace the attacking and reloading custom tasks with an ICode FSM.
     
    Ramsdal and jimmikaelkael like this.
  31. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    783
    @opsive I've watched the video and wow this is exactly how I expected ICode and Behaviour Designer to work together.

    The only thing that I'm currently asking is how you tell ICode to exit FSM and return (result or not) to Behavior Tree ?
     
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,093
    There is a Resume Behavior Tree ICode action which will tell the behavior tree when it can start back up again (assuming you have the behavior tree waiting for ICode, you can also have the behavior tree start ICode and continue on without needing to wait)
     
    jimmikaelkael likes this.
  33. importguru88

    importguru88

    Joined:
    Jan 26, 2016
    Posts:
    11
    I have the set trigger set on the enemy ai . When I click on play on the screen attack animation is already playing before I get to the enemy.
     
  34. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    You have to put a condition (most likely range to target) before shifting to the attack state :)
     
  35. importguru88

    importguru88

    Joined:
    Jan 26, 2016
    Posts:
    11
    I did that .I am using the icode software . For some reason it's the enemy animation still not working.
     
  36. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Hard to say, could be an error in the setup of your Animation Controller perhaps. Try to compare with some of the example scenes from ICode :)
     
  37. importguru88

    importguru88

    Joined:
    Jan 26, 2016
    Posts:
    11
    Okay.
     
  38. b1gry4n

    b1gry4n

    Joined:
    Sep 11, 2013
    Posts:
    146
    Hi, i bought your asset when it was called Mecanim for Ai back in 2014, I was wondering if i can get the updated asset. I tried contacting you by email, but cant seem to get a response. I have the ORD number and everything.
     
  39. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, please contact me at support@unitycoding.com
     
  40. Ghikya

    Ghikya

    Joined:
    Jan 18, 2014
    Posts:
    4
    Nice extension. I have a question. Is it using reflection at runtime or not? As we know that reflection is not compatible with iOS (due to it's AOT compilation mode)
     
  41. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    There are actions that use reflection, but most are not using reflection.
     
  42. bigrip

    bigrip

    Joined:
    Mar 25, 2015
    Posts:
    9
    hi I bought that on sale.
    Simpe Waypoint System support?
    https://www.assetstore.unity3d.com/en/#!/content/2506

    if there is no support,how can i make a path with wayoints.
    i do the tutorial on youtube but how to make this with more than one waypoint?
    if i had 50 same ai and 50 different paths how to manage this?
     
  43. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    Icode has integration with Realistic FPS Prefab?
     
  44. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    So this addon dead?