GAC Quickstart Steps

VERSION 1.8
GAC has a very simple and easy to learn workflow. Once you get the hang of it; which you should in minutes, your workflow will be smooth and production will skyrocket. To jump in immediately and start using GAC, follow these steps: 
  • Drag the GAC.cs script from the GAC folder onto the Game Object. 
  • The Animation Setup menu will be the first menu that comes up initially, this is where to start.
  • GAC will set itself for Legacy or Mecanim Animation Controller Type based on what type of Animation Component is on the Game Object (Animation or Animator). There is the option to switch between each type depending on what to use later and GAC will add/remove those components automatically when needed.
The Animation Controller Popup Menu
Switching between controller types resets all of GACs settings. GAC will throw a warning when this is about to happen.








  • GAC allows the choice between 3 different Movement Components. These are CharacterController, 3D with Rigidbody and 2D with Rigidbody. The Rigidbody components of course allows for the use of Physics with GAC. Also if 2D with Rigidbody is selected, this tailors GAC to work with 2D restrictions; so use this mode if creating 2D games. The other 2 modes represent 3D games.

Movement Components Popup Menu shows the 3 types 
  • Select the amount of Activators the GAC System will be able to use from the popup menu. Activators are basically inputs (or input combinations) to use for games like on a controller/keyboard etc. For E.G. Activator 1 - A button. The more activators added, the more buttons can be used to create more complex combo setups. Max amount of activators available to use is 100 (will increase limit if necessary and only should be done when not affecting game performance). You can also edit the Source Code till your heart is content!
Activators Popup Menu (Max is 100)

GAC will give a warning when reducing the amount of activators already added just as a precaution to prevent deleting combos and activator inputs that were setup, which GAC will do if necessary activators are removed.


  • Based on the Movement Component Type selected above, GAC will provide feedback when it needs that component to be added or removed. When the button is green, then it is a required component that can be added by clicking the button. You can also remove the component be clicking it's button when red.
Movement Component's Add/Remove buttons
  • For optional use is the Range Mode Tracking. By default, GAC adds targets to the Target Tracker for hit detection as soon as they are enabled in the scene. With this mode, set GAC to only add targets when they get within a radius and remove them when the are not. This will also help with performance when needed.
Enables and sets Target Tracker radius size



The position of the Tracker Radius can also be adjusted when in 2D with Rigidbody Movement Component mode.

Set the Tracker Radius Position



    Specific to 2D with Rigidbody Movement Component mode, is the Facing Direction Setup. This helps GAC automatically know when a 2D character is facing left or right using the current scale value of the game object (GameObject Transforms in the top-most section of the inspector). The Right Facing Scale looks for what scale is being used to represent the character facing right (only either 1 or -1), so set this. The Flip Anchor sets the anchor position of where the game object's transform will rotate from (Middle, Left, Right including extremes of each); this requires a bit testing and eyeing to see what fits.  
Setup the Facing Direction of 2D characters

  • GAC needs what are called Animation Slots to use to create combos and these slots house specific animations with their own attributes. To begin adding Animation Slots for use, click the  NEW ANIMATION SLOT button. Subsequently, by adding at least 1 animation, each slot will have a + button to add more slots below them. 
Add animation Slots for GAC to use

If the NEW ANIMATION SLOT button is not available, it is because there are no animations available to use either from the Animation or the Animator Component. Check to make sure animations are ready for use in GAC from those components. 


  • Use the Play Mode popup menu to choose between Normal or Cross-fading of animations for smooth blending. If cross-fading is chosen, adjust the blend in time.
 
Setup Play Mode for Animations Blending

  • An animation needs to be set to this slot for use. So select an animation from the popup menu then click the APPLY button to set the selected animation. This means that animation owns the slot (vice-verse) and the animation cannot be applied to another slot. Clicking the EDIT button allows the removal of that animation from the slot.
Set the animation to this Animation Slot
GAC allows the use of only one animation to create combos. This allows the repeating of the animation in a combo when necessary. Of course it is more creative to use multiple different animations in a combo.






    GAC prevents the removal (clicking EDIT button) of animations from slots if animation is being used in a combo. To solve this just remove the animation from the combo first. GAC will provide a warning when this happens.

    • A Combo needs to have what is called a Starter Animation that initializes the combo; the first animation in the combo. Choose at least one of the Animation Slots to use to start a combo (Any and all Animation Slots can be used as starters if necessary) by click the USE AS STARTER button. This selection can be made later on after finishing the other steps below.
      Sets the animation as a starter
        • Linking an animation in a combo requires the player to successfully send an input event within an animation’s frames. The Link Slider allows the setting of the frame range for the player to be able to connect their animations in a combo. Set this up for the Animation Slots that are going to be used to link to other Animation Slots.
          The Link Slider for connecting animations in combos; with Delay trigger
          • Each Animation Slot also has a Delayed Animation option that allows for even more complex combos specifically ones that are triggered when an input event is delayed. E.G. A, A...(wait)...A. To use this, click the DELAY ON (See above) button and set the Delay Frames range with the slider (just like the Link Slider). There is also a timer that counts down from 0.5 to determine the window allowed for more input from the player. 
          Set Delay Frames for more advanced combos

            For debugging purposes, the Delay Countdown turns green whenever it is within the set limits of the slider.



            • For optional use is the Move Slider. Turn this on by clicking the Move On button if you plan on moving the character during certain animation frames. 

            Use the Move slider to add easy movements to animations

            • The Move Amount (X, Y, Z only shows in CharacterController or 3D with Rigidbody Movement Component; with 2D with Rigidbody only X and Y axis are shown of course) option works when the Move Slider is turned on. Set this for the distance to move the character during animation. 

            Move Amount Axis Fields

            • Now we are almost finished setting up our Animation Slots for use, next is to begin setting up GACs Hit Detection. If not planning to use, scroll down to the Combo Setup menu step which is in bold and underlined.

            The following steps involve use of GACs Target Tracker Hit Detection System, so if you have your own hit detection system you can skip these steps: 

            • For optional use is the Hit Detection. Turn this on by clicking the Hit On button. Use the slider to set the frame range on when to check for hits. When hit is on, the following steps are unlocked to use.
            Use the Hit slider to register hits during animations
            • In the Affect Layers section, choose what layers the Animation Slot should affect with a hit.

            The Affect layer popup can be used to mask any layers setup in Unity
              • Set the max distance the Animation Slot should affect using the Affect Distance section. 
              The Affect Distance value field, context adjust by dragging left or right of field

                • Set the max angle the Animation Slot should affect using the Affect Angle section. There is also an optional Height On mode to use height in detecting a GameObject to hit; perfect for attacks that only affect flying or ground enemies.

                The Affect Angle value field with Height On option



                The Angle Position option shows up when using 2D with Rigidbody Movement Component. Set to adjust the position of the Hit Detection angle.




                Hit Detection Angle's Position to adjust 

                • The Damage Animation Number section allows the choice of a specific damage animation setup on a Target Tracker. Use this to have different reactions to each specific animation. This is defaulted to 1. You can also set it to randomize between all the different damage setups.
                Set the DAN (Damage Animation Number) to use

                • Use the FOCUS GIZMO button to visually see the cone range that the Animation Slot will affect in the Scene View. Customize the color for easier representation of all the  Animation Slots. 

                Customize the Gizmo Color
                The following steps go into setting up your animations in a combo using the Combo Setup menu:

                • Make sure Activators have be added at this point. If not, do so now. Select the amount from the Activators popup.
                • Select the Combos Setup menu. The Starter Animations popup will have all the Animations Slots set to Use As Starter available. This should have been done in previous steps above; otherwise GAC will provide warning when no animation is available to use to start a combo. If there was an Animation Slot set to use, add one to the combo system by clicking the ADD STARTER button.
                The Popup Menu to select starter animations to add
                • Now that a Starter Animation is added, begin adding combos to this starter by clicking the ADD COMBOS button, subsequently remove this Starter Slot by clicking the DELETE STARTER button when needed.


                Starter Animation buttons

                Any animation under this Starter Animation group will ALWAYS start off with that Starter Animation.



                • Now that a Starter Animation is added, one option is using a Normal Combo Link by clicking the ADD ANIMATION button that adds a normal animation spot or a Delayed Combo Link by clicking the ADD DELAY button that adds a Delay Animation spot to begin customizing your combo.  Also customize combos by giving it a specific name which can help finding the combo easier when necessary and have a lot of combos. Click the ADD NAME button and when finished click SET NAME button.

                Combo Setup properties showing Normal and Delay Animation Buttons

                • In the Animation Spot, select the Activator and Animation to use.  Click the EDIT button to change that slot if needed. Delayed Animation Spots are marked by the D on the left and colored Blue. A green C! button will ONLY appear when Context Variables are setup in the Context Menu to be used. Set these variables to allow the Animation Spot to play only if the Context Variable conditions are met. Maximum of 2 variables can be used per Animation Spot. Come back to this step after the Context Menu steps below are completed.

                Normal Animation Spot

                Delayed Animation Spot

                Context Animation Spot; Max of 2 Context Variables per Animation Spot


                Another Animation Spot cannot be added without first clicking the SET button to place that animation on the sequence.
                   
                    The APPLY button will not work for the Animation Spot without clicking SET button for the added Context Variable Spot first.


                  Click the EDIT button on any animation spot in combo to make changes. GAC will keep a record of the animations that are in higher sequences and place them back into their respective sequences when that spot has been SET again.


                  • After setting the spot for the first animation, continue to add animations slots to create your combo. You can add different combos under that Starter Animation Slot group.

                  A different animation for a separate combo cannot be on the same sequence (unless the sequence is a Delayed Animation, but the rule still stands with 2 Delayed Animations having different animations on same sequence). This conflicts with what GAC will allow to play for that sequence. GAC will notify with warning if this happens. To rectify this, change the Activator number used; GAC also prevents Play mode from starting if not fixed. 

                  • Now lets go check out our combo setups in a visually readable format by using the GAC-PAC window located in Window>Great Animation Combos (GAC) > Preview Animation Combos (PAC). This is great for also testing out the combos to see how they play into each combo link. See the GAC-PAC Window page for more info.
                   


                  GAC-PAC has an ACTIVATORS button that shows or hides the Activator numbers used to start the animation in that specific combo. Also each animation box has an Activator label (marked with Red number) on bottom left and a Delayed Animation label (marked with a Blue D) on the bottom right. This provides more helpful information for the combos.

                  The following steps go into setting up the Activator Slots to trigger an input event using the Activator Setup menu:

                  • Click on the Activators Setup Menu. There will be a The Activators popup menu that provides basic Inputs that come with Unity including Keyboard, Mouse, and Button events. Select whichever input you want to use and click the NEW ACTIVATOR button to create an Activator Slot for this event. See the Activators Setup page for more info.

                  The Activators used for the input events
                  The Basic Activator Types


                  GAC also natively supports the use of other Asset Packages that leverage their own input events systems. Current package supported is InControl which is sold separately on the Unity Asset Store. More support for other input event packages are on the Roadmap that include NGUI, EZGUI, CF-Input and Control Freak. If you have an events package you want to see supported let me know, I will do my best to accommodate your request.

                  • Custom coded input events can also be used with GAC. See the PlayTheAnimation() API example that shows the use of the Unity Keyboard Input Event in code.
                  • Based on the type of Activator Slot created, there are going to be different options of setup. See the Activators Setup page for more detailed information. After attributes are finalized in the Activator Slot, click the SET/APPLY button to start using this Activator in the combo system.
                  This is a Keyboard Activator Slot

                  • When Context Variables are available to use, the activator slots will have an arrow on the Activator type sections name (see below with K for Keyboard and red color code). Click this button to open up the options to choose if to ADD CONTEXT or HIDE CONTEXT. Adding a context makes it available to be setup for that specific activator. Come back to this section after getting through the Context Menu steps below. Maximum of 5 Context Variables allowed for each activator slot.
                  Activator Context options

                  Activator Context Spot to setup (Max of 5 per Activator Spot)


                  The following steps go into setting up the Context Variables to create conditions using the Context Setup menu:

                  • So the basics have been done in creating the combos using GAC. Next up is to add more advanced options for combos. Click on the Context Setup menu.

                  • The Context Variables section will be available to allow the selection of multiple different context variable types to add and use to put conditions on Combos and Activators. Select from String, Int, Float, Bool and Mecanim Parameter options, depending on the situation. This section has to be planned through on deciding the type and name of variables to use. Select the type and click the NEW CONTEXT button to add. Setup the context slot and SET it for use. Head back to the previous steps for Combos and Activators to add the contexts that were added in this, for more information on Combo Contexts or Activator Contexts see the corresponding Combos Setup and Activators Setup pages. For more detailed information on setting up Context Variables, see the Context Setup page.
                  The Context Variable types to choose from

                  Now you are done with the initial setup, so go create GREAT COMBOS!