Specialty Component Controllers
Over time, new controllers may be added for more specific or advanced purposes.
AnimatorController
The AnimatorController facilitates a link between SALSA Suite-supported modules (currently SALSA and EmoteR) and Animator parameters (bool, trigger, float, int). Please familiarize yourself with the Animation Phases in the Notes on Animation Timings document.
-
Controller Type: Animator
-
Reference link to the desired Animator.
-
Select a pre-configured parameter on the linked Animator. The parameter type is automatically detected and handled according to the following rules (refer to the Animation Phases diagram below):
-
Bool: Set
true
on animation ON start (ref point #1 in the Animation Phases diagram). Setfalse
on Animation OFF start (ref point #3 in the Animation Phases diagram). -
Int: Set to 1 on animation ON finish (ref point #2 in the Animation Phases diagram). Set to 0 on animation OFF finish (ref point #4 in the Animation Phases diagram).
-
Trigger: Set on animation ON start (ref point #1) and reset on animation ON finish (ref point #2). (Optionally, when 'Trigger both ways' is enabled -- see point 4 in the controller diagram above) Set on animation OFF start (ref point #3) and reset on animation OFF finish (ref point #4).
-
Float: Set throughout the animation cycle according to the current calculated animation
lerper
. The value will be between [0.0f .. 1.0f]. From 0.0f to 1.0f between points #1 and #2 in the Phases diagram. From 1.0f to 0.0f between points #3 and #4 in the Phases diagram.
-
-
(ONLY applies to Trigger types) Enable trigger operation in both directions ON and OFF.
-
Selected parameter information -- displays the type of the selected parameter. Hovering this box will provide information specific to the controller operation on this parameter type.
EventController
Please read the information on Events in SALSA LipSync Suite. This controller implements event triggers for certain points along the animation cycle. Please refer to the Animation Phases diagram in the Notes on Animation Timings document.
NOTE: There are two template files in the Examples > Scripts folder (SALSA_Template_EventControllerSubscriber, SALSA_Template_SalsaEventSubscriber) that demonstrate how the events can be used. The demo boxhead scene also implements the SALSA events template, writing to the console when SALSA starts/stops SALSAing. The SALSA event template component simply needs to be dropped on an object and linked to a SALSA component -- this simple template will then write to the console as the SALSA processing state changes. The EventController event template operates similarly -- add the component to any game object. To configure it, simply enter the
EventIdentifier
string that matches the controller configuration. It will subscribe to the EventController events and filter delegate processing according to the identifier string.
-
Controller Type: (C#) Event
-
The event identifier is a string element used to assist in filtering events during subscription processing. For example, in the
EventController.AnimationStarting
delegate method, events from this controller are filtered based on the identifier matching the string == "buddy" (case sensitive):
private void OnAnimationStarting(object sender, EventController.EventControllerNotificationArgs e)
{
if (e.eventName == "buddy")
{
// do some stuff...
Debug.Log("EventController fired OnAnimationStarting for: " + componentEventName);
}
}