예제 #1
0
        private void PlayHapticClip()
        {
            if (clip == null)
            {
                BhapticsLogger.LogInfo("clip is null");
                return;
            }

            clip.Play();
        }
예제 #2
0
        protected void PlayUI()
        {
            GUILayout.BeginHorizontal();
            if (targetScript == null)
            {
                BhapticsLogger.LogInfo("hapticClip null");
                GUILayout.EndHorizontal();
                return;
            }

            if (GUILayout.Button("Play"))
            {
                targetScript.Play();
            }
            if (GUILayout.Button("Stop"))
            {
                targetScript.Stop();
            }
            GUILayout.EndHorizontal();
        }
예제 #3
0
        void OnEnable()
        {
            targetScript = target as HapticClip;

            isAutoPlay = PlayerPrefs.GetInt(PlayAutoConfig, 1) == 0;

            if (isAutoPlay)
            {
                targetScript.Play();
            }
        }