SG Com Unity Package Scripts
SG Com Global
Responsible for initialising and cleaning up shared SG Com resources. Ensure that there is only one instance of this component per scene.
Inspector Properties
License File Name
: The name of the license file (including the file extension) in "StreamingAssets/SpeechGraphics/License".Logging Level
: Sets the verbosity of the SG Com log.
SG Com Session
Manages a single session of SG Com.
Add the script to the GameObject you wish to animate.
Inspector Properties
Character Control File Name
: Name of control file (including the file extension) in "StreamingAssets/SpeechGraphics".Audio Sample Rate
: The sample rate of the audio.Audio Sample Type
: The sample type of the audio.Audio Buffer Seconds
: The size of the audio buffer in seconds.Animation Buffer Seconds
: The size of the animation buffer in seconds.Enable Idle
: A Boolean flag to enable or disable idle animation.Use Fixed Seed
: A Boolean flag to use a fixed seed for the random number generator.
SG Animation Instance
Handles the playback of animation.
Add the script to the GameObject you wish to animate. Requires the SG Com Session script.
Inspector Properties
Avatar Root
: A GameObject that acts as the root of the avatar.Rotation Factor
: Converts between Maya and Unity coordinate systems for rotation.Translation Factor
: Converts between Maya and Unity coordinate systems for translation.Blendshape Factor
: Adjusts SG Com blendshape values (0-1) to Unity blendshape values (0-100).
SG Audio Input
Handles microphone or file input for real-time facial animation.
Add the script to the GameObject you wish to animate. Requires the SG Com Session and Audio Source scripts to be added to the same GameObject.
If no audio file is attached to the Audio Source script it will use the microphone input. If an audio file is attached, it will stream the audio file.