using UnityEngine; public class DeactivateAmplifyMotion : MonoBehaviour { public bool withChildren = true; private void Start() { AmplifyMotionObjectBase[] array = null; array = ((!withChildren) ? GetComponents() : GetComponentsInChildren(true)); if (array != null) { AmplifyMotionObjectBase[] array2 = array; foreach (AmplifyMotionObjectBase amplifyMotionObjectBase in array2) { AmplifyMotionEffect.Instance.Unregister(amplifyMotionObjectBase.gameObject); amplifyMotionObjectBase.enabled = false; } } } }