- Home /
wp8 interaction with unity3d
All samples and templates shows that the xaml layer reads what happening on the D3D layer. Dispatcher.BeginInvoke(() => It works, no problem.
Is there any sample to use UnityApp.BeginInvoke? All i want to do is that let unity know when i touch/swipe the xaml layer. (sorry for my basic english)
Answer by Ejlersen · Jul 26, 2014 at 09:19 AM
MSDN had a blog post about UnityApp.BeginInvoke. Hope that will help you achieve what you want:
To call from within XA$$anonymous$$L UI thread onto the Unity thread, use:
1: UnityApp.BeginInvoke(() => 2: { 3: //access Unity objets here.. 4: });
Thats all what i have found on this page... am i missed something?
Your right. I can't test this myself at the moment, but if you want to register swipes, then you should probably have a look at the manipulation events, like:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.manipulationstarted
Then add the UnityApp.BeginInvoke code in the methods you hook upto the events.
Your answer
![](https://koobas.hobune.stream/wayback/20220613155017im_/https://answers.unity.com/themes/thub/images/avi.jpg)