Definition
PauseAllAnimationsOfPrefabInstances([optional] string exception_1, [optional] string exception_2,..., [optional] string exception_n)
Description
This function pauses animations of all prefab instances except for the animations of prefab instances sent to the function.
Parameters
[optional] string exception_1, [optional] string exception_2,…, [optional] string exception_n
Specifies the name of prefab instances whose animation should not be paused. If no name is passed to PauseAllAnimationsOfPrefabInstances function, animations of all prefab instances will be paused.
Example
function OnTriggerEnter(otherActorName) --nil means main character controller if otherActorName == nil then PauseAllAnimationsOfPrefabInstances("1_animation_test_plane", "2_animation_test_boy") end end function OnTriggerStay(otherActorName) end function OnTriggerExit(otherActorName) end
Assume that the above script is attached to a trigger named trigger1. Whenever the main game character enters “trigger1”, animations of all prefab instances except the animations of prefab instances “1_animation_test_plane” and “2_animation_test_boy” will be paused.
PauseAllAnimationsOfPrefabInstances