![]() |
Interhaptics SDK for Unity 1.6
|
Public Member Functions | |
override void | Play () |
Call this method to play the haptic effect. | |
override void | Stop () |
Call this method to stop the haptic effect. | |
override void | PlayEventVibration () |
Method to start the coroutine from outside (if necessary). Plays the haptic effect after the vibrationOffset. | |
override IEnumerator | ControlVibration () |
Controls the vibration perception based on the full length of the haptic material; stops any residual haptics which might come from the controller after the haptic playback length (made for platforms other than mobile) | |
![]() | |
virtual void | ApplyTargetIntensity () |
void | ApplySourceIntensity () |
Call this method to apply the source intensity. | |
void | ApplyLooping (int loopValue) |
Call this method to apply the looping state. | |
void | DebugMode (string debugMessage) |
Debug method to print messages in the console only when debugMode is enabled. | |
void | AddTarget (List< HapticBodyMapping.CommandData > Target) |
Call this method to add a target to the haptic effect. | |
void | RemoveTarget (List< HapticBodyMapping.CommandData > Target) |
Call this method to remove a target from the haptic effect. | |
Public Attributes | |
AudioSource | audioSource |
![]() | |
HapticMaterial | hapticMaterial |
bool | useStreamingAssets = false |
string | hapticEffectStreamingAssetsPath |
float | vibrationOffset |
bool | debugMode |
bool | isLooping |
int | maxLoops = 1 |
float | maxLoopTime = 10f |
double | targetIntensity = 1.0 |
bool | playAtStart = false |
bool | isPlaying = false |
double | hapticEffectDuration = 0 |
Coroutine | playingCoroutine = null |
double | loopStartTime = 0 |
Protected Member Functions | |
override void | Awake () |
Add the haptic effect file to the when the object is created. The haptic effect file can be in the StreamingAssets folder if the useStreamingAssets property is set to true. | |
override void | Start () |
Initialize the haptic effect settings at the start of the game. | |
![]() | |
virtual void | Update () |
Update the haptic effect settings at every frame. | |
Properties | |
bool | PlayOnAwake [get, set] |
![]() | |
int | HapticMaterialId [get, set] |
float | SourceIntensity [get, set] |
Additional Inherited Members | |
![]() | |
const string | ERROR_MESSAGE_MONO = "Interhaptics requires IL2CPP scripting backend for Android. Please change it in Player Settings. Haptics will not play on the Mono scripting backend on the Android platform." |
Definition at line 17 of file AudioHapticSource.cs.
|
protectedvirtual |
Add the haptic effect file to the when the object is created. The haptic effect file can be in the StreamingAssets folder if the useStreamingAssets property is set to true.
Reimplemented from Interhaptics.Internal.HapticSource.
Definition at line 28 of file AudioHapticSource.cs.
References Interhaptics.Utils.AudioHapticSource.audioSource, and Interhaptics.Internal.HapticSource.playAtStart.
|
virtual |
Controls the vibration perception based on the full length of the haptic material; stops any residual haptics which might come from the controller after the haptic playback length (made for platforms other than mobile)
Reimplemented from Interhaptics.Internal.HapticSource.
Definition at line 82 of file AudioHapticSource.cs.
References Interhaptics.Internal.HapticSource.DebugMode(), Interhaptics.Internal.HapticSource.hapticEffectDuration, Interhaptics.Internal.HapticSource.loopStartTime, Interhaptics.Internal.HapticSource.maxLoops, Interhaptics.Utils.AudioHapticSource.Play(), Interhaptics.Internal.HapticSource.playingCoroutine, Interhaptics.Utils.AudioHapticSource.Stop(), and Interhaptics.Internal.HapticSource.vibrationOffset.
Referenced by Interhaptics.Utils.AudioHapticSource.PlayEventVibration(), and Interhaptics.Utils.AudioHapticSource.Start().
|
virtual |
Call this method to play the haptic effect.
Reimplemented from Interhaptics.Internal.HapticSource.
Definition at line 58 of file AudioHapticSource.cs.
References Interhaptics.Internal.HapticSource.AddTarget(), and Interhaptics.Utils.AudioHapticSource.audioSource.
Referenced by Interhaptics.Utils.AudioHapticSource.ControlVibration().
|
virtual |
Method to start the coroutine from outside (if necessary). Plays the haptic effect after the vibrationOffset.
Reimplemented from Interhaptics.Internal.HapticSource.
Definition at line 73 of file AudioHapticSource.cs.
References Interhaptics.Utils.AudioHapticSource.ControlVibration(), and Interhaptics.Internal.HapticSource.playingCoroutine.
Referenced by Interhaptics.Platforms.GameInput.Samples.GameInputXInputHapticController.PlayAudioVibrationController(), and Interhaptics.Samples.AudioControlGUI.StartHaptics().
|
protectedvirtual |
Initialize the haptic effect settings at the start of the game.
Reimplemented from Interhaptics.Internal.HapticSource.
Definition at line 43 of file AudioHapticSource.cs.
References Interhaptics.Internal.HapticSource.AddTarget(), Interhaptics.Utils.AudioHapticSource.ControlVibration(), Interhaptics.Internal.HapticSource.playAtStart, and Interhaptics.Internal.HapticSource.playingCoroutine.
|
virtual |
Call this method to stop the haptic effect.
Reimplemented from Interhaptics.Internal.HapticSource.
Definition at line 65 of file AudioHapticSource.cs.
References Interhaptics.Utils.AudioHapticSource.audioSource, and Interhaptics.Internal.HapticSource.RemoveTarget().
Referenced by Interhaptics.Utils.AudioHapticSource.ControlVibration().
AudioSource Interhaptics.Utils.AudioHapticSource.audioSource |
Definition at line 21 of file AudioHapticSource.cs.
Referenced by Interhaptics.Utils.AudioHapticSource.Awake(), Interhaptics.Utils.AudioHapticSource.Play(), Interhaptics.Utils.AudioHapticSource.Stop(), Interhaptics.Samples.AudioControlGUI.StopHaptics(), and Interhaptics.Samples.AudioManagerMobile.StopPlayingAudioHapticSources().
|
getset |
Definition at line 26 of file AudioHapticSource.cs.