Search Unity

[RELEASED] Emerald AI 3.2 (New Sound Detection) - The Ultimate Universal AAA Quality AI Solution

Discussion in 'Assets and Asset Store' started by BHS, Jun 26, 2015.

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm having issues with RFPS integration. I'm pretty sure I followed the instructions to the letter, but there are 2 issues. First, the AI agent no longer does its idle animation nor does it walk around like it did before I implemented the RFPS integration. Second, there seems to be an invisible barrier around the enemy AI preventing the player from getting close to it.

    [EDIT]
    However, I can shoot arrows at it and the hit animations play as well as the death animation when it dies. And once dead, then I can move passed it.

    [EDIT 2]
    I figured out that the enemy AI's box collider is what is preventing the player from approaching. If I make it Is Trigger then I can approach, but then I can't hit it either. Seems like something is not quite right with the integration.

    [EDIT 3]
    Also, I did notice that if I can close enough to it, then it starts idling and moving around. But the box collider prevents that right now.

    [EDIT 4]
    Looks like the box collider just got scaled way too big. My monster happened to be very small scale and when I scaled it up, the collider got huge. Still some other little issues, but I can't write them up right now. Will do that when I get a chance.
     
    Last edited: Apr 24, 2017
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there!

    The box collider is supposed to be automatically scaled to your model's mesh size for a perfect fit when using the setup system Window>Emerald AI>Create AI. It sounds like for some reason your box collider is off. You can always adjust it manually to better fit your model. The box collider is intended to have IsTrigger set to false. I believe this is essential for RFPS.

    If your AI isn't properly detecting your player, ensure that you have Player Uses Seperate Layer check as this needed due the RFPS's Player layer. Also check that your AI's NavMesh Agent's radius is set to be about the size of your model. Also check that your Attack Radius is set so there's enough distance for your AI to attack.

    If you are using an arrow to attack your player, you will need to do what you did with the bullet script to your arrow script. If you need a guide, I can help you out. We haven't had a chance to add it to the wiki tutorial.

    How big is your model/AI you are using? Have you adjusted its scale? If you could post a picture of your AI, and its setup, it would better help me understand what's going on.
     
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It's mostly resolved now except for a couple of issues. Once I realized the box collider was messed up I started over and made sure the original model was scaled properly in its import settings before proceeding.

    The remaining issue that I know of so far is as follows:

    The AI only activates and begins to do something when the player actually collides with it. I would expect the AI to be wandering around when it's within viewing range, but it just stands there until I make contact with it. Even after I collide with it, if I then move away from it, the AI just stops doing things again.

    I've looked at the range options and can see them visually as well and they look fine. I have no idea why it seems to only activate when I make contact with it.

    [EDIT]
    The other thing I don't understand is why the min/max attack damage values are restricted to such low values? Why can't I just enter any values I want? 25 as max damage is really low.

    [EDIT 2]
    OK, so what I've discovered is that if the player starts already within the AI's attack radius then the AI doesn't activate. As long as the player is outside the radii then the AI wanders around and does things until the player comes within range. But it doesn't always do what is expected. For example, my last test when I got within range the AI rushed the player and took up a battle stance, but it just stood there and never actually attacked. And another AI that was nearby just stood there with its side to me and never reacted at all even though I was in combat with another AI right next to it.
     
    Last edited: Apr 24, 2017
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    What happens is the AI's detection collider is placed on the AI's model. The problem with this is that the model's scale is sometimes a little off when the model was modeled. When Emerald searches for a player, its detection collider is off so because its size is also based off the model. This sometimes makes detecting targets inconsistent. This issue is only related to very few models, but will be fixed with a quick update that will be submitted within the next couple of days.

    For a temporary fix, see if the following works:
    Find the line below in the Emerald_Animal_AI script
    Code (CSharp):
    1. CollidersInArea = Physics.OverlapSphere(transform.position, huntRadius * transform.localScale.x, LayerMask.GetMask(EmeraldLayerMaskString, PlayerLayerMaskString));
    Add * 20 to this line like below to compensate for the model's scale:
    Code (CSharp):
    1. CollidersInArea = Physics.OverlapSphere(transform.position, huntRadius * transform.localScale.x * 20, LayerMask.GetMask(EmeraldLayerMaskString, PlayerLayerMaskString));
    Please let me know if this helps. If not, I'll figure out what's going on.

    As for the caps in the editor, I totally agree. These will be increased to much higher caps with the said update.
     
  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I would suggest removing caps and just let us enter any value we want.

    One more suggestion. You should allow other animations to have multiple versions like you have with attack animations. Especially the Hit animation. Some models have multiple hit animations, multiple Idles, etc.
     
    daisySa likes this.
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, the caps will be removed with version 1.3.5. If you want them to be removed now, I can show you how to do so via PM.

    With Emerald 1.4, we be making quite a few improvements. These improvements will include more animations for idling hitting. Thanks for the suggestions.
     
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Excellent. I can remove the caps myself.

    Sounds good.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Btw, the * 20 fix doesn't really work any better. Every once in a while, one of my 2 AI units will activate and rush my player when I get near it, but about 90% of the time they just remain idle until I get right next to them. And even when they activate and go into battle stance, if I just back away from them then they just stand there idle and don't do anything. I also see issues where the AI occasionally start their walk animation, but they never actually move anywhere. They just walk in-place.

    Note that I'm using this for indoor scenes and I see your demos are all outdoor on terrain. Have you tested this extensively indoors? It seems like there are issues with that scenario.

    [EDIT]
    If I increase to * 2000 then both AI rush the player when he's close. But the problem with backing away is still there. I only have to back away a few feet and the AI just stop attacking and go to idle.
     
    Last edited: Apr 24, 2017
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    * 2000 would be too much as you just need a little bit of extra distance to compensate for your model's scale difference.

    If your AI agent is changing to idle mode instead of attacking, even though your player is within range, this is because of the model and its Mecanim animations. If its animation center point is off, it throws off the distance detection. What models are you using? If you test the demo AI we supplied, I'm sure they will work fine without any issues.

    I haven't exclusively tested Emerald in an indoor setting, but make sure your AI have enough head space when inside. Also, make sure that your NavMesh has properly baked.

    Try using these settings with your AI's animations:
    MecanimAnimationPositionAdjustments.png
     
  10. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I don't think there's a scale issue at all. I originally scaled it up 3.5 times, but then I started over and simply changed the model's import scale. So, the actual transform scale for the model is just 1.

    It's using Legacy animations. The model is this one:

    https://www.assetstore.unity3d.com/en/#!/content/9711

    Yes. I modified collider to give plenty of space and NavMesh is baked and looks good.
     
  11. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    For sanity check I copied the exact same AI units and RFPS player components into an outdoor scene with terrain. I baked the navmesh and ran it without any changes to the AI or RFPS. And the issues I was seeing in the indoor scene are gone. I even removed the * 20 hack and it's fine. So there is definitely some issue with indoor setups.
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Here is a screenshot of the AI unit with the navmesh visible in the indoor scene.

    upload_2017-4-24_18-19-12.png
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    And here is a video showing how the AI are unresponsive indoors.

     
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Very interesting. Thanks for the video and explanation. It helps me better understand what's going on.

    I will dig further into this to find out what's going on. My guess is that it has to do with a setting with the NavMesh Agent that limits the over head space an AI can move. When I find a solution, I'll be sure to post it here.
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks. Other than this issue, the system is very easy to use and works very well with RFPS.
     
  16. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    45
    After installing Crux (just bought it on sale today) I can no longer Access Window, Emerald nor Window, Crux for that matter. It may have overwritten something related to the previous fixes: using UnityEngine.AI; or using UnityEditor.AI checks, but when I looked in the scripts they looked fine, yet I get API compiler errors.

    APIUpdater encountered some issues and was not able to finish.


    System.IO.FileNotFoundException: Could not find file "/opt/Unity/Editor/Data/Mono/lib/mono/2.0/System.xml.dll".
    File name: '/opt/Unity/Editor/Data/Mono/lib/mono/2.0/System.xml.dll'
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0021a] in <5d83a8d54e334cdc853a0dba68082096>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <5d83a8d54e334cdc853a0dba68082096>:0
    at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    at System.IO.File.OpenRead (System.String path) [0x00000] in <5d83a8d54e334cdc853a0dba68082096>:0
    at Roslyn.Utilities.FileUtilities.OpenFileStream (System.String path) [0x00000] in <bededc41dc2d4bfca1b18012876b04b2>:0

    and now I cannot use Emerald AI nor CRUX (Nothing shows up under Window). Any workaround/fixes appreciated. I am using Unity 5.6.0f3. It was working before.

    Next, I created a new project with only Emeradl AI and it fixed Emerald AI.

    Possible workaround in CRUX: I opened the script called SimpleAI.cs and figured I would add the following line at the top: using UnityEngine.AI;

    That seems to do the trick but I will let the developer confirm it.
     

    Attached Files:

    Last edited: Apr 25, 2017
  17. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there!

    Thanks for the detailed information.

    We have tested Emerald and Crux by importing them into Unity 5.6.0.3f with no issues. What I think you're seeing is an error that sometimes happens when updating an asset to a newer version of Unity that has a window Editor. I've seen it a few times. Usually closing Unity and opening it again fixes the issue with not being able to see the window contents.

    As for the AI API compiler errors, we have never been able to recreate this error. It appears to be very rare and random. I think it may be a Unity bug. I do know that adding the namespace using UnityEngine.AI fixes them, if they occur. using UnityEngine.AI was added to Emerald and we will do the same with Crux. However, everything should still be working in Unity 5.6.03f without it.
     
  18. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    45
    Thanks BHS, I got it working now but I did have to update a Crux script as well.
    CRUX: I opened the script called SimpleAI.cs and figured I would add the following line at the top:
    using UnityEngine.AI;

    Btw, when can we expect the next version of Crux that allows spawning not just by texture? I would like to spawn a) At a certain height range of terrain b) a certain distance around player c) underwater d) above water only e) at a specific location (ie a chicken in a chicken coup), a penguin on the beach and so on. Also looking forward for 'time of day' spawn capabilities coming with UniStorm. So far Crux is working nicely with Emerald AI. I have not yet purchased UniStorm (but will after update).

    I was able to create some interesting behavior using for example a 'passive' Boar in Emerald AI but that has Player tagged as food. Then when Crux spawns some boars, they will naturally come towards the player (and of course not attack, since they are passive. This creates the illusion that they are curious about the player, which got me wondering if we might have the ability to 'feed' them with a 'feeding module'? Also I would love to see more features for Emerald AI related mainly to a) ability to avoid water c) stay in water d) enter/exit water e) flying AI f) swimming AI and perhaps also senses like 'hearing' or 'touch' ie triggering a 'scared/alert' sound (made by the animal) when player touches it. I usually did this with a collider trigger then play the sound, but that does not seem to work with Emerald AI.
     
  19. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Quick update. I've tried other models for AI and have had better success. They seem to work much better indoors than that skeleton model I was using. They wander around and attack when in range for the most part. Still testing, but it seems to be working better.
     
  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Does esmerald support creatures with ranged attacks ?
    And Any water creatures like fish, shark ? Any aerial creatures like birds , dragons ?
     
  21. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi, I am extensivly using your amazing tool and I would like to ask you:

    Is there any way to make the animal/NPC turning more natural?
    I mean, even playing a bit with the turning speed, I get a not very natural movement (too quick or too slow).

    My idea is:

    1)The Wandering Waypoints should have smaller angle (considering the angle between the two paths)

    or

    It could be possible to make the animal turn in a small semi circle made of few waypoints (like 3 points) and then, when it is in line with the next Distant Waypoint, it start to walk.

    I am not sure if I was fully clear (I am not a native speaker, sorry).


    Thanks in advance and best regards,

    Dom
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Crux 1.1 will be coming around or near the release of Emerald 1.4. They are both being worked on simultaneously. Realistically, figure about 1 to 2 months. There's still a lot that needs to be done.

    More spawning conditions are planned with the 1.1 update for Curx. Spawning conditions according to height is a great idea. We also plan on adding spawning conditions according to zones, which should allow spawning near camps, farms, caves, etc.

    More behaviors will come with the 1.4 update. We are still planning on having the Companion behavior type, as well as redoing some of the others to be more versatile. We are going to try and get the first part of the hearing/sensing feature added with the 1.4 update.


    Great to hear. I wonder why the skeletons weren't working properly.


    Not current, but ranged attack is a planned feature with the 1.4 update. Flying/Water based AI are also planned for the 1.4 update.


    Hey there!

    A walk turning speed of 3 and a run turning speed of 6 usually look the most natural. It also depends on the size of the AI.

    We will be improving the way waypoints are done with the 1.4 update. Thanks for the suggestions.
     
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I have no idea. But with other models as well as some tweaking to the NavMesh baking and NavMeshAgent properties I'm now getting really good results.
     
  24. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    When you access the currentHealth variable from the Emerald_Animal_Ai.cs script, it is by default 15, instead of the value shown in the Health Options inspector section. How do I get the current health that is displayed in the inspector from an external script?
     
    Last edited: Apr 29, 2017
  25. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    okay, i'm looking for an AI system that can cover most genres of games but mainly fps and rpg...
    At this point in time i need a system where the ai would react to gun shots and explosives.
    For example if i threw a grenade inside an enemy base they should try to find the player same as if the player was to kill an npc the npc should find the player.
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I found a bug in your RFPS integration code. In the ArrowObject code you have a line as follows:

    Code (CSharp):
    1.                     Destroy(this.gameObject); //This is optional so that the arrow doesn't stick into the AI
    2.  
    However, destroying pooled objects is bad because the pool eventually runs dry and it can't spawn new ones. Instead, the code should be as follows:

    Code (CSharp):
    1.                         AzuObjectPool.instance.RecyclePooledObj(objectPoolIndex, this.gameObject);
    2.  
    This returns the arrow to the pool so it can be reused.
     
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there!

    currentHealth is the variable that gives you the AI's current health. The editor is supposed to be getting the startingHealth variable not the currentHealth.

    If you want an example of current health displayed with UI, see the Enemy AI Health Bar Example scene for a working health bar system.


    Hey there!

    Emerald has a multi-tag system for detecting targets. It also has API that allows you to directly set an AI's target. So, if you wanted an AI to attack the player after being hit by a player's grenade, you would just set the player as the target through the collision of your grenade with something like: Collision.GetComponent<Emerald_Animal_AI>().MakeAttack (targetToSend);


    Thanks! I'll be sure to update the tutorial.
     
  28. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    well, it's more of the sound of the grenade that i'm talking about but does the ai pick up the sound of the payer shooting at them even without the bullet hitting them
     
  29. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Sound detection will be coming with Emerald 1.4. So, if you'd like to have sound detection currently, you would need to implement this yourself. However, the MakeAttack (targetToSend) function I suggested should be able to trigger an attack if a custom script were to look for a certain sound level being reached. You would still need a reference to a target though, which could be handled with a OnTriggerEnter function.
     
  30. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    see on rfps it does have that feature but only for weapons not grenades :/
     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Is there some trick to get this feature to work?

    * Emerald has amazing performance by utilizing Unity's LOD system. This is done by deactivating Emerald and its components when not in view. This allows Emerald to have 1,000's of AI within 1 scene at a time. AI are then activated when within view when they become unculled. This process is seamless and fast. We tested this with 1,000+ AI/Animals spread across 13 square miles and maintained 60+ frames per second.

    I don't ever see my AI deactivate. I run my game and have both scene and game view visible and even when I'm far away from the AI and they are blocked by geometry, they are still roaming around doing their thing. They are definitely not within view. They're not even in the camera frustum.

    [EDIT]
    Does this simply mean that I'm supposed to add an LODGroup to my AI manually and set the culling distance?
     
    Last edited: May 1, 2017
  32. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    You may be able to use the same method as the weapon sounds and apply it to the grenades. When I get the chance, I'll see if I can find a solution for you.


    My apologies for the confusion, there should be a tutorial covering this. I'll add be sure to add one to the Wiki today.

    You are correct. You must apply a LOD Ground component to your AI with its main model as the LOD 0, or as many LODs you have on your model. Once your AI is culled, Emerald will deactivate the AI to save performance and won't enable it again until it becomes unculled.

    LODGroup.png
     
  33. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks for the info.
     
  34. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I still encounter some intermittent issues with Emerald AI in my dungeon scene. Here are the main issues that I see:

    AI Doesn't Attack
    Some AI almost never attack when the player is within their attack radius. I made an AI agent from the following asset and this issue is pretty much 100% of the time with it.

    https://www.assetstore.unity3d.com/en/#!/content/10104

    If I attack the spiders then they respond and fight back, but I can usually run around them forever and they never attack, but just keep wandering. Once or twice I had them initiate attack, but it was rare.

    AI Attacks, but Animation Doesn't Play
    I have 4 instances of the same AI in a room and occasionally one or two of the AI never move from their start position, but when I get right next to them I start taking damage and I hear the AI's attack sound. But the attack animation isn't playing.

    AI Stops to Attack but Keeps Running
    This is pretty common for one of my agents. The AI rushes the player and suddenly stops moving, but the run animation keeps playing. So it looks like it's stuck and can't come any closer for a few seconds. So I'm not sure whether it's actually stuck and is trying to come closer or that it's just stopping there on purpose, but the animation just hasn't stopped like it should.
     
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks for the detailed information. We submitted an update that should fix all of the issues you've mentioned.

    I'll be posting the release notes shortly.
     
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Awesome. Perfect timing.
     
  37. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey everyone!

    We have submitted a quick update for Emerald (version 1.3.5) to fix some of the issues mentioned recently. These improvements will make things much easier for setting up. We have added a new feature that helps users out by having a fail-safe system in place for improperly assigning animations or forgetting to assign them. This new system will either assign an animation that can act as a placeholder (Example: Having 3 attack animations enabled but only assigning 1. Emerald will automatically assign the attack 1 animation to these slots to avoid errors) or disabling animations if a user forgets to assign too many animations to also avoid errors. Emerald will now give error messages to tell you what animation you are missing or what needs to be done to resolve the error.

    There have also been improvements with the way an AI detects its targets as well as well as many other improvements to the overall system and its functionality.

    This is all to take a step towards the release of Emerald 1.4, which will be quite a significant update.

    Improvements
    • The Mecanim setting now has built-in animations for all motions for the created Animator Controller. This fixes issues users had when not assigning animations after creating said Animator Controller.
    • Animations include: Idle/Graze 1, Combat Idle, Attack 1, Death, Walk, and Run. These animations should work with any (Humanoid) Mecanim model and will allow users to have a working AI right after generating an Animator Controller through Emerald. If you are using a quadruped model, these animations will still be applied to avoid an error, but you will need to assign your model's animations to the created Animator Controller.
    • Added a new animated model to better demonstrate Emerald.
    Fixes
    • Fixed inconsistencies with AI's Trigger.
    • Fixed an issue that didn't allow AI to properly initialize an attack or flee.
    • Fixed an issue where Returns to Start was only usable with NPCs. This option is now available to both NPC and Animals.
    • Fixed an issue where an AI would play its walk speed instead of its run speed when returning to its starting position.
    • Fixed an issue where an AI would only return to start once.
    • Fixed an issue where an AI would never stop chasing its target if Returns to Start was disabled.
    • When Returns to Start is disabled, and an AI's chase seconds have been reached, it will switch to wandering mode.
    • Fixed an issue that was not properly setting an AI's chase seconds.
    • Fixed an issue that didn't allow an AI's animations to work properly when not using a Unity Terrain as their NavMesh source.
    • Fixed the Dust Effect prefab from being disabled instead of the created Dust Effect.
    • Improved animations when following a player with the proper food tag.
    • Added an animation check to ensure that the animations used exists in the Animation Component. This prevents a lot of confusion when users forget to apply their animations.
    • Added error messages to the console to guide users who encounter errors. These errors are almost always related to unassigned animations or using animations that were not assigned to an AI's Animation Component.
    • Removed Max Chase Distance from editor as this is more of an internal variable that often lead to confusion.
    • Removed caps on an AI's and Player's attack settings within their editors
     
    Last edited: May 3, 2017
    julianr and magique like this.
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    One complaint I have about the code is that it's not extendable. I wanted to create an inherited class to extend certain behaviors, including performing some functions when the AI gets damaged, but the functions are not virtual. I see that you have some message sending variables that are possibly for some future extensibility, but they don't do anything right now. Are you planning for some future update to address this? I've already got custom code changes and I'll have to re-incorporate them every time the asset is updated or just go without future updates/fixes.
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Great question.

    With the 1.4 update, we will be rewriting/improving a lot of Emerald's code, adding new API, and adding an event system similar to what we have done with our UniStorm system here: https://forum.unity3d.com/threads/s...storm-mobile-free.121021/page-90#post-3024826

    This will allow users to call custom functions on scripts based on events like fleeing, attacking, grazing, dying, taking damage, and more. Emerald 1.4 will be a lot more customizable and have greatly improved functionality. The goal is to have nearly anything achievable through events or Emerald API without users having to make custom code changes to the Emerald system itself.
     
    Inspeinre and Weblox like this.
  40. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    How far off is 1.4? I'm in a bit of a pickle with needing customization rather soon, but if 1.4 is coming quick then I might wait and do all that customization at the end of the development cycle.
     
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Figure a little over a month, realistically.
     
  42. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey everyone!

    Emerald 1.3.5 has is now live!

    This update fixes includes quite a few improvements as well as fixes with AI not consistently detecting targets.

    The 1.3.5 update also has a new demo scene, a new demo model, and example idle, idle combat, walk, run, attack, and death Mecanim animations. All example animations are automatically applied to the Animator Controllers generated with Emerald allowing users to test out their AI immediately.

    For the full release notes, see the post here: https://forum.unity3d.com/threads/r...y-herds-npcs-more.336521/page-20#post-3053365

    New demo scene with new example mecanim character and animations.
    NewDemoSceneAndAnimations.png
     
    Last edited: May 5, 2017
    Inspeinre and julianr like this.
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks.
     
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It seems like this update breaks existing AI. Is there some sort of upgrade guide to allow existing AI to continue to work or do I have to re-create all my AI in this new version.
     
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Strange, the update shouldn't affect any AI or their settings from the previous version. AI from the previous version were even tested with the new update and they were fine. What specifically isn't working properly?
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I think I know what happened. I removed the previous version, which is usually the way to do it for an upgrade, but it complained that the AI didn't have animation controllers. But I realize now that the created animation controllers were probably in the original Emerald AI folder structure. Thankfully, I had a backup. So, should the upgrade simply be installed over top of the old version?
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Interesting, thanks for the information and good thing you had a backup. For upgrading, I have always just imported the new version into the existing one, but I think it depends on the asset. If an asset has components which it has created, it can cause issues if they are deleted.

    Emerald's Animator Controllers are stored in the Animator folder within Emerald, which is probably why you had issues when you removed Emerald.

    In the future, I would recommend just importing Emerald into your existing project. There shouldn't be any issues and this is normally tested before we submit our updates to the Asset Store.
     
  48. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Sounds good. I would recommend mentioning this in some read me or upgrade notes file. Mainly because most asset authers recommend removing an older asset before installing a new one and very few are OK with installing over top.
     
  49. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Thats awesome news! I just have been reading through the link and the Event System in UniStorm looks perfect. I can't wait to have similar in Emerald and to try the 1.4 update. Also I didn't yet work with UniStorm but luckily I've been getting it at the Unity Mega-Sale and hope to have it in my Project(s) soon. :)
     
    Last edited: May 9, 2017
  50. lofwyre

    lofwyre

    Joined:
    Apr 19, 2007
    Posts:
    174
    Might give this a go when it hit's 1.4. I'd like to detect for an AI NPC the direction of getting hit and the position of the hit and based on those play a different animation, sound effect and particle . is that something that can be done in 1.3 or 1.4?

    Cheers
    Matt