-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EntryPointNotFoundException while in Unity Editor #22
Comments
Try this
|
Same error for me on Mac machine. EntryPointNotFoundException: _impactOccurred
Vibration.VibrateIOS (ImpactFeedbackStyle style) (at Assets/Scripts/Vibration/Vibration.cs:85) As I see, public static void VibrateIOS(ImpactFeedbackStyle style)
{
#if UNITY_IOS
_impactOccurred(style.ToString());
#endif
} I believe the issue is that unity editor is also considered #if UNITY_IOS
#if UNITY_EDITOR
Debug.Log($"Impact with style {style} occured");
#else
_impactOccurred(style.ToString());
#endif
#endif Maybe it makes sense to create a wrapper around the Library that would encapsulate the logging part static class MyVibration
{
public static void Vibrate(ImpactFeedbackStyle style) // choose the name that fits you or just reuse the interface of the library
{
#if UNITY_EDITOR
Debug.Log($"Impact with style {style} occured");
#else
Vibration.VibrateIOS(ImpactFeedbackStyle.Heavy);
// Please note, Android is not handled, it's just an example
#endif
}
} |
Trying to call Vibration.VibrateIOS(ImpactFeedbackStyle.Medium) while inside the Unity Editor returns an error. It works fine once built to the device though. I'm running this on a Windows 10 computer, so perhaps I'm missing some native IOS stuff. Might just deny it if I'm in the Unity Editor, but wanted to post this just in case.
The line that's causing the error:
`
#if UNITY_IOS
#endif
`
Error:
_EntryPointNotFoundException: impactOccurred assembly: type: member:(null)
Vibration.VibrateIOS (ImpactFeedbackStyle style) (at Assets/Vibration/Vibration.cs:84)
SingletonMaster.VibrateInput () (at Assets/Scripts/Singletons/SingletonMaster.cs:133)
SingletonMaster.Vibrate (VibrationType t) (at Assets/Scripts/Singletons/SingletonMaster.cs:109)
MainMenu.Vibrate (VibrationType t) (at Assets/Scripts/Management/MainMenu.cs:162)
MainMenu.ToggleMenu (System.Int32 index) (at Assets/Scripts/Management/MainMenu.cs:118)
UnityEngine.Events.InvokableCall
1[T1].Invoke (T1 args0) (at <7b2a272e51214e2f91bbc4fb4f28eff8>:0) UnityEngine.Events.CachedInvokableCall
1[T].Invoke (System.Object[] args) (at <7b2a272e51214e2f91bbc4fb4f28eff8>:0)UnityEngine.Events.UnityEvent.Invoke () (at <7b2a272e51214e2f91bbc4fb4f28eff8>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/[email protected]/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/[email protected]/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/[email protected]/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/[email protected]/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/[email protected]/Runtime/EventSystem/EventSystem.cs:501)
The text was updated successfully, but these errors were encountered: