Release Notes
=====================================================
Version 1.9
=====================================================
AI Behavior is now compatible with Unity 5!
Since this is still a Unity 4.x package there are a few graphical issues, many of which can be solved by changing the shader to the new “Standard” shader. There will be a Unity 5 specific package in the near future.
Features:
————
Added a new Audio trigger
Added the ability to use off mesh links
Added two additional modes to the Flee State: Direction and AwayFromNearestPlayer
Added a new trigger InSameLayer
Added a new trigger IsObstructedFromPlayer
Added a new Group trigger that is simply used to nest other triggers within it
Updated the LineOfSight trigger to have a sight transform override
The Flee State now defaults to the AwayFromNearestPlayer mode
Added boxes around each state’s properties in the inspector to make editing easier
Added a zip file with a hit detection script for UFPS
Added a SetPatrolPoints example script
Added an overrideable point distance method to the patrol state in case a non 1:1 distance ratio is needed
Added a timer to the NoPlayerInSightTrigger
– It will not trigger until no player has been visible for the specified number of seconds
– If a player is spotted, it will reset the timer
Fixes:
————
Updated the example scripts to handle melee on the default prefab character and to work with UFPS
BaseState selection now works properly when using the default State Inspector for custom states
Gizmos now draw properly for sub triggers
Changes:
————
The default rotation speed is now 360 instead of 90
Rotation when using a NavMeshAgent is no longer based on angularVelocity, but is now handled internally
The variable ‘eyePosition’ is now private, use the ‘GetSightPosition’ method instead
The InPlayerView trigger’s GetMainCamera is now overrideable
The InPlayerView trigger’s mainCamera field is now protected instead of private
The targetItem Transform in the SeekState is now protected instead of private so it can be accessed in sub classes
Broke out which objects can be potential helpers for the HelpState into a virtual method “GetPotentialHelpers”
The Capsule collider on the avatar_complete prefab is no longer a trigger
The editor methods in BaseState are now virtual instead of abstract
=====================================================
Version 1.8
=====================================================
Features:
————
Added a new script (CachePlayerTagsOnAwake) that can be added to a spawnable player (or the like) so the newly spawned player will be recognized AIs.
Added boxes around groups of items in the inspector to make editing a easier
Fixes:
————
Fixed a possible null reference exception when assigning patrol points through the API.
Changes:
————
The AI and the targets it’s looking for are now automatically ignored when raycasting.
– This affects triggers like LineOfSight and NoPlayerInSight and anything that calls the GetClosestPlayerInSight method
Updated the JS examples to be updated and have a cleaner method for using them.
=====================================================
Version 1.7.8
=====================================================
Features:
————
Added an ExcludeFromStatesList attribute that can be added to a state in case you want it to not show up in the states dropdown. This is useful in cases such as Mock states for Unit Testing.
Changes:
————
Added overridable methods to AIBehaviors, BaseState and BaseTrigger called CreateObjectFinder so a custom object finder can be used
TaggedObjectFinder now has an overridable method ‘GetGameObjectsWithTag’ to pass an array of GameObjects by tag. This can be used if you need to use a custom tagging system apart from Unity’s.
BaseState and BaseTrigger now define a field “ownsObjectFinder” if it is a root of using Custom Tags
Made TaggedObjectFinder.CacheTransforms a virtual method
Fixes:
————
Added a check in MoveAgent to see if the navMeshAgent is enabled before setting the destination since it logs an error
Fixed an error in the PatrolState.SetPatrolPoints method where it was looking at the current patrol point array size instead of the new one
=====================================================
Version 1.7.7
=====================================================
Changes:
————
Low and High Health Triggers now derive from the base class HealthTrigger.
Removed several variables that weren’t being used.
Updated the Triggers GUI to have compile flags to tell the difference between Unity 4.3 and future versions of the Undo.RegisterFullObjectHierarchyUndo method.
=====================================================
Version 1.7.6
=====================================================
Features:
————
Added the ability for an AI in the IdleState to rotate toward its’ target.
=====================================================
Version 1.7.5
=====================================================
Features:
————
Added a maxHealth variable to the main AIBehaviors script.
Added an AddSubTrigger method to the BaseTrigger class.
Added a parentTrigger variable to the BaseTrigger class.
Abstracted distance checking in the Patrol state into a virtual method “CheckIfWithinThreshold” so that it can be overriden for things such as when 2D characters are at different Z values but using the same patrol path.
Changes:
————
Made the editor Gui more friendly to setting up an AI on the fly through code.
Removed some debug statements from AIBehaviorsAnimationEditorGUI.
Fixes:
————
AI will no longer allow a transition from a trigger if the transition state is null.
=====================================================
Version 1.7.4
=====================================================
Changes:
————
Made each AI component derive from SavableComponent which gives each AI a unique id when GetSaveID() is called.
Fixes:
————
Fixed a bug where ‘Auto’ for animation states wasn’t working properly.
=====================================================
Version 1.7.3
=====================================================
Changes:
————
Moved “CurrentStateTrigger” into the AIBehavior namespace
Fixes:
————
Fixed a possible null reference exception in the AttackState
=====================================================
Version 1.7.2
=====================================================
Changes:
————
Added a check if the Animation component is set to AlwaysAnimate in the AttackState so it will continue to use the animation’s time instead of approximating it.
=====================================================
Version 1.7.1
=====================================================
Changes:
————
Wrapped the Editor classes in compiler flags in case they are moved into the Plugins folder.
Fixes:
————
Fixed an issue in the AttackState where an AI wouldn’t attack if it had a skinned mesh renderer that wasn’t visible in a camera. When not visible it now calculates it’s own normalized time based on the animation that would have been playing.
Fixed an issue where an AI was unable to be damaged when calling AIBehaviors.GotHit instead of just blocking from going into the GotHit state.
=====================================================
Version 1.7
=====================================================
Features:
————
Added a new trigger for detecting if the AI is in a state or not.
Fixes:
————
The follow state’s last sighted position is now set initially to the AI’s position in case a player can’t be sighted. It was defaulting to the world origin.
Fixed a bug where Undo would cause errors after a trigger was changed.
=====================================================
Version 1.6.9
=====================================================
Features:
————
Added a simple Spaceship example to the project.
Dead State now has a destroy timer on it, if it’s set above 0 it will be destroyed after X secs of coming into the dead state.
Added tooltips for the high and low health triggers for better understanding on the user’s end.
=====================================================
Version 1.6.8
=====================================================
Fixes:
————
Fixed a freeze bug in the InPlayerViewTrigger
=====================================================
Version 1.6.7
=====================================================
Fixes:
————
State cooldowns no longer initialize values when the cool down is persistent when leaving the state. This was most evident when animations wouldn’t change, but affected other things as well.
Changes:
————
Created an abstract CooldownableState that all cooldownable states derive from, thus, Cooldown options are no longer included in states that don’t use cooldowns.
=====================================================
Version 1.6.6
=====================================================
Features:
————
Added an additional SetPatrolPoints method to the Patrol State that allows you to pass in an array of points instead of just a parent.
Changes:
————
Added the Follow State back in, but it’s no longer included in the initial setup.
The Patrol State resets the patrol when adding new points due to the possiblity of a null reference exception.
=====================================================
Version 1.6.5
=====================================================
Features:
————
Added a default Auto option to the Animation type drop down so the user doesn’t have to choose between Legacy and Mecanim.
Added a Random option to the Patrol state for both Patrol Mode and Continue Previous Patrol Mode.
Changes:
————
Removed the Follow state since all of its’ behavior can be replicated via states and triggers.