swift-unity icon indicating copy to clipboard operation
swift-unity copied to clipboard

uesr interaction disabled

Open Steven4294 opened this issue 6 years ago • 9 comments

calling

currentUnityController = UnityAppController()
currentUnityController.application(application, didFinishLaunchingWithOptions: launchOptions)

seems to disable all user input. Not even adding the UnityView or anything, just telling the UnityAppController that the application has launched prevents touches from being sent.

Steven4294 avatar May 03 '18 20:05 Steven4294

It probably has to do with unity initializing on the main thread. From my tests touches are received but the callbacks are fired 5-6 seconds later when main thread is free and unity finished init, I doubt that it has to do with the project setup.

szczebel1995 avatar May 08 '18 16:05 szczebel1995

Has somebody ever solved this problem?

setoelkahfi avatar May 16 '18 10:05 setoelkahfi

Any success in fixing this issue?

VladKorzun avatar Jun 12 '18 11:06 VladKorzun

@VladKorzun yes, I manage to solved it. Checkout my answer on this SO thread.

If you still have problem, feel free to reply.

setoelkahfi avatar Jun 13 '18 04:06 setoelkahfi

@setoelkahfi thanks for a quick reply. Unfortunately, it still creates a window in the foreground that takes all interactions. Managed to solve it by removing all window creation logic from Unity generated code and replace the window with actual app window.

VladKorzun avatar Jun 14 '18 14:06 VladKorzun

Glad that you solved it @VladKorzun . If you don't mind, please share your solution as an answer to my SO thread.

setoelkahfi avatar Jun 17 '18 01:06 setoelkahfi

@setoelkahfi done!

VladKorzun avatar Jun 18 '18 08:06 VladKorzun

Neither of these solved it for me

WyattMufson avatar Aug 19 '19 21:08 WyattMufson

@WyattMufson do you have a UIWindow instance in front of your UI when you inspect view hierarchy?

VladKorzun avatar Aug 20 '19 10:08 VladKorzun