Giter VIP home page Giter VIP logo

nicevibrations's People

Contributors

dependabot[bot] avatar joaomcfreire avatar mzzndr avatar reunono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nicevibrations's Issues

Conflict with Meta XR on Unity

Bug report

I am using NiceVibrations included in Feel asset.
After migratiion from from Oculus integration to Meta XR All in one packege I get this error:
Multiple scripted importers are targeting the extension 'haptic' and have all been rejected: Lofelt.NiceVibrations.HapticImporter (assembly: C:\Unity\Projects\Darkness\Library\ScriptAssemblies\Lofelt.NiceVibrations.Editor.dll), Oculus.Haptics.Editor.HapticClipImporter (assembly: C:\Unity\Projects\Darkness\Library\ScriptAssemblies\Oculus.Haptics.Editor.dll)
UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters ()

Checklist

  • I'm using the latest release
  • [Y] I've searched for existing issue

Environment

<Describe your dev environment here, giving as many details as possible. If you have them, make sure to include>
Feel 3.15
Meta All in ones SDK 60
Unity 2021.3.31f1

Goals

<What do you want to achieve?>

Steps to Reproduce

<What are the steps necessary to reproduce this issue?>

Expected behavior

<What do you expect to happen?>

Observed behavior

<What actually happened? Can you provide a stack trace?>

Code Samples & Details

<Please provide a code sample if necessary, as well as any additional details, to help us track down the issue.>

Duplicate tasks in Xcode when build iOS with Append

Bug report

Checklist

  • [x] I'm using the latest release
  • [x] I've searched for existing issue

Environment

Unity 2022.3.15f
Feel version 3.16

Nice Vibrations | Haptic Feedback for Mobile
v4.1.2, using Lofelt Studio SDK v1.3.4

Goals

I want to build iOS with Append

Steps to Reproduce

  1. Import only NiceVibrations folder from Feel package
  2. Build project to iOS for the first time, set Automatic signing, run to be sure, that everything is working
  3. Make some changes, build project to iOS by selecting Append
Screenshot 2024-04-23 at 10 36 17

Expected behavior

When I Append, I expect project in Xcode is without errors

Observed behavior

I get Unexpected duplicate tasks in Xcode (If you check Unity-iPhone -> Build Phases , there will be from 2-4 clones of Embed Framwork LofeItHaptics.framework

Screenshot 2024-04-23 at 10 30 50 Screenshot 2024-04-23 at 10 31 14

Code Samples & Details

This issue appears in 4th project, I think you can easily reproduce it with clean project as well. I all the time forced to build with Replace, not Append, how I used to. And I faced this issue only with yours library, I have tried many different libraries in my life :)

Showing Recent Messages Framework 'LofeltHaptics' not found | Xcode build error for Unity mobile game

Bug report

Checklist

  • [* ] I'm using the latest release
  • [* ] I've searched for existing issue

Environment

We are using Unity 2021.3.27f1 along with Feel 3.13.0, building the game for Android and iOS

Goals

We wanted to integrate haptic feedbacks on our UI buttons and build the game successfully for both Android and iOS

Steps to Reproduce

Integrate Feel into the game, place the functions for the haptic feedbacks on UI buttons and build the game for iOS then try to build it into xcode on a MAC machine

Expected behavior

It should build successfully in xcode then be able to upload it to the app store, on android it works without any problem.

Observed behavior

After it was exported from unity and tried to be built in xcode it will throw this error and the build stop:

Framework 'LofeltHaptics' not found
Linker command failed with exit code 1 (use -v to see invocation)
ld: warning: ignoring duplicate libraries: '-lc++'
ld: framework 'LofeltHaptics' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Code Samples & Details

<Please provide a code sample if necessary, as well as any additional details, to help us track down the issue.>

Crash report from [liblofelt_sdk.so] lofeltHapticsLoadDirect

Bug report

Checklist

  • [+] I'm using the latest release
  • [+] I've searched for existing issue

Environment

Our mobile game uses the Nice Vibration package from the Feel package. The crash is coming from the Android app.

Steps to Reproduce

We can't reproduce the issue on our own test devices, but many crash reports are coming from our live game. Crash reports are coming from the Android app and we can't figure out exactly what the problem is as the error comes from inside the "liblofelt_sdk.so" library.

Expected behavior

When we call the method "HapticPatterns.PlayPreset(HapticPatterns.PresetType.LightImpact);" in the Android app, we should be able to invoke the LightImpact vibration without any issues.

Observed behavior

Crash reports come from certain devices when the "HapticPatterns.PlayPreset(HapticPatterns.PresetType.LightImpact);" method is called in the Android app.

Code Samples & Details

We are using it in a simple way within the game. When a button is pressed, we call this method.
"HapticPatterns.PlayPreset(HapticPatterns.PresetType.LightImpact);"

When we look at the crash reports from the Google Play dashboard, we see many reports like this.
`*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 31076 >>> com.link.match <<<

backtrace:
#00 pc 0x00756c61765f7465
#1 pc 0x000000000001ca5c /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/liblofelt_sdk.so
#2 pc 0x0000000000018954 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/liblofelt_sdk.so (lofeltHapticsLoadDirect+332)
#3 pc 0x0000000001fd00f0 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (LofeltHaptics_lofeltHapticsLoadDirect_m212DB3189B44BE54F822058250FAE6FFBB72500B)
#4 pc 0x0000000001fcc4fc /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (HapticController_Load_mE6AA251161ED4A27476BC30C51AD716D49B15573)
#5 pc 0x0000000001fcccd0 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (HapticPatterns_PlayPreset_m4BBC460337643C4051BA3AC077AAD1E2BB4B9B90)
#6 pc 0x00000000009bdd24 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (Action_1_Invoke_mF2422B2DD29F74CE66F791C3F68E288EC7C3DB9E_Multicast(Action_1_t6F9EB113EB3F16226AEF811A2744F4111C116C87*, Il2CppObject*, MethodInfo const*))
#7 pc 0x00000000028ef654 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (UnityEvent_Invoke_mFBF80D59B03C30C5FE6A06F897D954ACADE061D2)
#8 pc 0x0000000001e23b50 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (ExecuteEvents_Execute_TisRuntimeObject_mDC4455B743BE4A6BA46DD741D0E0AB150FF1209A_gshared)
#9 pc 0x0000000001afc524 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (StandaloneInputModule_ProcessTouchPress_mD72A0807626DA04E47313F9553249DD4A32625E3)
#10 pc 0x0000000001afbba4 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (StandaloneInputModule_ProcessTouchEvents_m042FC6B13874B1EE6699BBB51F02FE3A435A25F0)
#11 pc 0x0000000001afb904 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (StandaloneInputModule_Process_mBD949CC45BBCAB5A0FAF5E24F3BB4C3B22FF3E81)
#12 pc 0x0000000000bbb48c /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**))
#13 pc 0x0000000000bbb300 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libil2cpp.so (il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**))
#14 pc 0x0000000000318bc8 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool))
#15 pc 0x0000000000326964 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool))
#16 pc 0x000000000033498c /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (MonoBehaviour::CallUpdateMethod(int))
#17 pc 0x00000000001a11bc /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (void BaseBehaviourManager::CommonUpdate())
#18 pc 0x000000000024cb74 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*))
#19 pc 0x000000000024cbb4 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*))
#20 pc 0x000000000024cdec /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (PlayerLoop())
#21 pc 0x00000000003a22e8 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (UnityPlayerLoop())
#22 pc 0x00000000003b86ac /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/lib/arm64/libunity.so (nativeRender(_JNIEnv*, _jobject*))
#23 pc 0x00000000000d89cc /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/oat/arm64/base.odex (art_jni_trampoline+124)
#24 pc 0x0000000000214a7c /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/oat/arm64/base.odex (com.unity3d.player.UnityPlayer$e$1.handleMessage+972)
#25 pc 0x0000000000654dd8 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+136)
#26 pc 0x0000000000658450 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1696)
#27 pc 0x0000000000215688 /data/app/~~SSMUplsNgTKXoJtKmD1Yew==/com.link.match-63K3Zp10EDlIDteJNz6G9g==/oat/arm64/base.odex (com.unity3d.player.UnityPlayer$e.run+216)
#28 pc 0x0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
#29 pc 0x00000000001a97e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#30 pc 0x000000000055e61c /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValuesart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460)
#31 pc 0x00000000005af6ac /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308)
#32 pc 0x00000000000ec8b8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#33 pc 0x000000000008c0d0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)`

We couldn't understand the reason behind this. Due to these errors, our Android application appears to have bad behavior. We would appreciate your assistance in resolving this issue.

haptic2ahap doesn't support newer Core Haptics versions with split mode

Bug report

Checklist

  • I'm using the latest release
  • I've searched for existing issue

Goals

convert a .haptic to .ahap using haptic2ahap in split mode (without -n option)

Steps to Reproduce

  1. Create a .haptic file, I used Meta Haptics Studio
  2. ./haptic2ahap hapticfile.haptic using haptic2ahap-0.2.1 (latest release). Note no -n option
  3. Both hapticfile_transients.ahap and hapticfile_continuous.ahap contain "Version": 0.0.

Expected behavior

I should be able to preview both .ahap files on macOS (tested on Sonoma), and play them on iOS (tested on iOS 17)

Observed behavior

The ahap version is unsupported according to preview, and the haptic does not successfully play on my iPhone

Screenshot 2024-02-04 at 9 29 51 AM

For reference, previewing with fixed version looks like:
Screenshot 2024-02-04 at 9 37 10 AM

Code Samples & Details

According to the docs the top level Version key represents the Core Haptics version supported by the ahap.

I could manually mitigate by changing the version in each file from 0.0 to 1.0. It's not clear to me if the tool actually needs any changes to support current CH (are there even multiple versions), or if the version added to each ahap just needs to be updated to 1.0. With my mitigation I didn't notice any other issues & playback worked fine when played simultaneously.

In non-split mode the version is always set to 1.0 in the builder https://github.com/Lofelt/NiceVibrations/blob/main/core/datamodel/src/ios/v1.rs#L155 but this is skipped for split mode. Since split mode skips over this it's also lacking a filled out Metadata key unlike non-skip. Didn't attempt to set up env to fix

Question: How can I convert my AHAP json to a HpaticClip

Hello,
I've been struggling to upgrade my old NiceVibration(3.9) to the latest Lofelt package.
I was using AHAP json files for iOS and MMNVAndroidWaveFormAsset for Android and I can't find any tools to convert them.
Is there a way to do this?

Multiple Haptics at the same time

Hello there, I am a solo developer and using nice-vibrations for the haptics of my application.

Since the way nice vibrations works is a black box to me I have the following question:

How does Nice Vibrations handle 2 vibrations that take place in the same frame? Does it add up the intensities and sharpness of both or does it just take the dominant parameters in terms of sharpness and intensity and play only 1 haptic?

Help would be great!

Exceptions and crashes on Android devices

Hey!
I'm getting a lot of exceptions on Android devices using Feel (NiceVibrations) v.3.1.3 package using Unity 2021.3.28f1:

Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
       at Lofelt.NiceVibrations.JNIHelpers.Call(Lofelt.NiceVibrations.JNIHelpers)
       at Lofelt.NiceVibrations.HapticController.Play(Lofelt.NiceVibrations.HapticController)
       at Lofelt.NiceVibrations.HapticPatterns.PlayEmphasis(Lofelt.NiceVibrations.HapticPatterns)
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
       at Lofelt.NiceVibrations.JNIHelpers.Call(Lofelt.NiceVibrations.JNIHelpers)
       at Lofelt.NiceVibrations.HapticController.Loop(Lofelt.NiceVibrations.HapticController)
       at Lofelt.NiceVibrations.HapticPatterns.PlayEmphasis(Lofelt.NiceVibrations.HapticPatterns)
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
       at Lofelt.NiceVibrations.JNIHelpers.Call(Lofelt.NiceVibrations.JNIHelpers)
       at Lofelt.NiceVibrations.HapticController.Load(Lofelt.NiceVibrations.HapticController)
       at Lofelt.NiceVibrations.HapticController.Load(Lofelt.NiceVibrations.HapticController)
       at Lofelt.NiceVibrations.HapticPatterns.PlayEmphasis(Lofelt.NiceVibrations.HapticPatterns)
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
       at Lofelt.NiceVibrations.JNIHelpers.Call(Lofelt.NiceVibrations.JNIHelpers)
       at Lofelt.NiceVibrations.HapticPatterns.PlayConstant(Lofelt.NiceVibrations.HapticPatterns)

and crashes:

Caused by java.util.concurrent.TimeoutException: com.lofelt.haptics.LofeltHaptics.finalize() timed out after 10 seconds
       at com.lofelt.haptics.LofeltHaptics.destroy(LofeltHaptics.java)
       at com.lofelt.haptics.LofeltHaptics.finalize(LofeltHaptics.java:242)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:339)
       at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:324)
       at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:300)
       at java.lang.Daemons$Daemon.run(Daemons.java:145)
       at java.lang.Thread.run(Thread.java:1012)
Caused by java.util.concurrent.TimeoutException: com.lofelt.haptics.LofeltHaptics.finalize() timed out after 10 seconds
       at com.lofelt.haptics.LofeltHaptics.destroy(LofeltHaptics.java)
       at com.lofelt.haptics.LofeltHaptics.finalize(LofeltHaptics.java:242)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:319)
       at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:306)
       at java.lang.Daemons$Daemon.run(Daemons.java:140)
       at java.lang.Thread.run(Thread.java:1012)

Do you have any solution for this?

Playing haptics while multiple gamepads are involved causes some haptic clips to play continuously.

Bug report

Checklist

  • I'm using the latest release
  • I've searched for existing issue

Environment

Unity 2021.3.9, Windows platform
Game is a local co-op game/couch co-op 1-4 players via gamepads.

Goals

We want a reliable method of triggering haptics on individual gamepads. With nice vibrations we are 90% of the way there however there is a bug where raising a haptic event on controller X and then on controller Y will cause X to not stop/clean-up properly.

Steps to Reproduce

Have 2+ controllers with vibration/rumble capacity plugged into the PC.
Have controller 1 trigger a haptic event via the calls:
GamepadRumbler.SetCurrentGamepad(gamepadID); HapticController.PlayClip(hapticClip);
Then have controller 2 trigger a haptic event.
This will cause controller 1 (assuming controller 1 was vibrating as controller 2 started its vibration) to continue indefinitely until a new haptic event is called on controller 1.

Expected behavior

Controller 1 and 2's haptic events should not affect each other.

Observed behavior

Controller 2's haptics influenced controller 1's haptics, causing it to play on it's last vibration 'note' forever.

Code Samples & Details

See above for the 2 lines of code we are using. We can confirm the methods are being called correctly.
We have identified the issue as being in NiceVibrations HapticController.cs script's Play() method;

if (remainingPlayDuration > 0.0f) { playbackFinishedTimer.Interval = remainingPlayDuration * 1000; playbackFinishedTimer.AutoReset = false; playbackFinishedTimer.Enabled = !isPlaybackLooping; } else { HandleFinishedPlayback(); }
there is only one playbackFinishedTimer in this class, so each subsequent call to Play() will not "wrap up" or cleanly finish the previous haptic's "HandleFInishedPlayback()". It will instead just play the next clip and handle it's clean up, leaving the original to play forever.

Audio&Haptic synchronicity managment

From the project you share, seems only here talking about the rule of syncing in Audio & haptic, or I missed something?
https://github.com/Lofelt/NiceVibrations/blob/main/clip-players/src/lib.rs#L25

In Android, Audio service and vibration service not running in same context, that means :

  1. play a short feedback like ui button, the sound&haptic is not easy to find the time gap
  2. in inputmethod scenario,the user input triggerd sound&haptic is easily to feel the gap
  3. play a long song/streaming & haptic , without realtime sync like video&audio, the time gap may easily to feel

From the IOS example,seems you are useing a standard audio API and not using any synchronicity between audio and haptic in SDK ?

HapticController.outputLevel setting while clip is not loaded raises a native java error.(Android)

Bug report

Checklist

  • [+] I'm using the latest release
  • [+] I've searched for existing issue

Environment

Apk built with Unity 2021.3.18f1
App runs on Pixel a6, Samsung Galaxy S23 and few other devices.

Goals

Set vibrations outputLevel to some value and have no errors in the log.

Steps to Reproduce

Execute next code right after application starts:

var inited = HapticController.Init();
HapticController.outputLevel = 0.2f;
Debug.Log($"Initialization result: {inited}"); // this logs true value, so initialization is successfull

Expected behavior

No errors and outputLevel set.

Observed behavior

Looks like the property is set correctly, but there is an error in log:

Error: java.lang.RuntimeException: Unable to set amplitude multiplication, no clip loaded.
java.lang.RuntimeException: Unable to set amplitude multiplication, no clip loaded.
 at com.lofelt.haptics.LofeltHaptics.setAmplitudeMultiplication(Native Method)
 at com.lofelt.haptics.LofeltHaptics.setAmplitudeMultiplication(LofeltHaptics.java:409)
 at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
 at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
 at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loopOnce(Looper.java:201)
 at android.os.Looper.loop(Looper.java:288)
 at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)

Code Samples & Details

This is not a critical issue, but if you use any crashlytics this issue makes your life a bit harder.

Can't build Nice Vibrations Asset

Bug report

Checklist

  • I'm using the latest release
  • I've searched for existing issue

Goals

I wan to build Nice Vibrations Asset.

Steps to Reproduce

Download the whole repository and run "sh build.sh" inside the main folder.

Expected behavior

Once its finished,a nice-vibrations-asset folder is created which contains the NiceVibrations asset.

Observed behavior

I can see such errors:
"~/Desktop/NiceVibrations-main
$ sh build.sh
➡️ Cleaning Nice Vibrations asset artifacts
➡️ Cleaning copied build artifacts
➡️ Building for iOS
rm: cannot remove 'derived_data': No such file or directory

Building archive for iOS Simulator

build-xcframework.sh: line 20: xcodebuild: command not found
❌ Failed to build archive for iOS Simulator
❌ Building iOS XCFramework failed
"

DeviceCapabilities.meetsAdvancedRequirements returns incorrect result on iPhone 15 Pro (possibly other devices)

Bug report

Checklist

  • [•] I'm using the latest release
  • [•] I've searched for existing issue

Environment

  • Unity 2022.3.11
  • Nice Vibrations 4.1.2
  • iPhone 15 Pro - iOS 17.1.2

Goals

Detecting support for advanced haptics, by using the included DeviceCapabilities.meetsAdvancedRequirements method.

Steps to Reproduce

Set up the Nice Vibrations package on a fresh Unity project, targeting the iOS platform. Add a debug call for DeviceCapabilities.meetsAdvancedRequirements, triggering on a button press, and monitor for the console output.

Expected behavior

iPhone devices from 2017 onwards (iPhone 8 and iPhone X and newer) all support Apple's Core Haptics API and should support all advanced haptics functionality, so the meetsAdvancedRequirements check should return true.

Observed behavior

The meetsAdvancedRequirements check returns false, which is incorrect. The hasAmplitudeModulation and hasFrequencyModulation checks also incorrectly return false, though these seem to use the same check method as meetsAdvancedRequirements anyway.

Code Samples & Details

These results can be confirmed as being returned incorrect by attempting to play advanced haptics without performing those checks beforehand. Advanced haptics files will play no problem at all without falling back to basic haptics, even though the requirement checks are saying that it's not supported.

I'm only able to test on the iPhone 15 Pro and iOS 17, so I'm not sure if this affects other devices, or just the latest generation iPhones (or potentially Android devices as well).

Short vibration issue on Samsung device

Bug report

Checklist

  • I'm using the latest release
  • I've searched for existing issue

Environment

I tryed on an empty projet with just building the nice vibration demo.
The phone with issue are S21 Ultra ans S20
And the issue isn't present on iOs device, Oneplus5T and ZenForce 8.

Goals

Have short vibration (one during .1sec and the other .5s)

Steps to Reproduce

Build the demo on a samsung device
Go to the continous tab
Launch a continous haptic pattern that is less than 1 sec
Or play Ball demo scene
Or play Car demo under the first threshold
Or play any Emphasised haptic pattern
Or play any preset in this list : [Light / Medium / Heavy / Rigid / Soft / Selection]

Expected behavior

The demo vibration

Observed behavior

There isn't any vibration

Code Samples & Details

in my game i use the HapticPatterns.PlayConstant() methods

Loop Issue

The clip loop is not working, and I suspect it's because the playbackFinishedTimer.Interval setting causes HandleFinishedPlayback to be called. I modified the code so that when looping, Enabled = false, but this still didn't solve the problem. I'd like to ask if anyone has encountered a similar issue and how to make the clip loop play properly?

Haptic clip doesn't work.

Bug report

Checklist

  • [+] I'm using the latest release (Never changed the version)
  • [+] I've searched for existing issue

Environment

<Describe your dev environment here, giving as many details as possible. If you have them, make sure to include>
I am working on a mobile game company that makes puzzle casual games.

Steps to Reproduce

<What are the steps necessary to reproduce this issue?>
I download the Meta Haptics Studio to convert .wav file to .haptic file when I finished that I imported .haptic files to my unity to see how it worked. I changed the clips that on the NiceVibrationsDemo scene page 3. (Haptic clips demo manager script) I changed the audio and the haptic clips. And than I build the game, in the build audio clips are changed I can hear that but haptic clips are the same on multiple devices (Xiaomi mi9t, huawei p20, samsung galaxy a23)

I logged the HapticController Play(HapticClip clip) function. Clips are changing so I am not getting the same clips.

Expected behavior

<What do you expect to happen?>
Clips needs to haptic different but all the 9 buttons are same haptic.

Code Samples & Details

<Please provide a code sample if necessary, as well as any additional details, to help us track down the issue.>
I used the Haptic Clips Demo Manager script. Just changed clips on the editor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.