Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by kilgore · Jan 13, 2014 at 07:08 PM · editortouchwindows

Windows Touch in the Editor

I'm attempting to use a Windows touch plugin provided by this fine gentleman.

The plugin gets multi-touch information from a window name that you pass to it. It works great when I compile the app, but I'm having trouble getting it to work in the editor.

I'm passing the name of the Editor window name amalgamation that shows at the top of the window of the Editor. An example would be Main.unity - SceneName - PC, Mac & Linux Standalone. Passing the plugin this window name doesn't return any touch data. My question is, does anyone know if the Unity Editor has any other windows associated with receiving input? It's the only thing I can think would be getting in the way of getting input to the plugin.

Plugin Links:

http://software.intel.com/en-us/blogs/2013/05/01/the-unity-multi-touch-source-finally?page=1

http://software.intel.com/en-us/blogs/2012/11/07/adding-multi-touch-support-in-unity-windows-apps#comment-1726247

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dansav · Dec 24, 2014 at 01:33 AM 0
Share

Hi. Did you ever get this working? His original .exe works, but I'm not having any success on building my own with his dll. I get 128 touches. I also rebuilt the dll in Visual Studio 2013 but get the same results. I'm on Unity 4.6.1 with a P2314T dell touchscreen.

avatar image kilgore · Dec 24, 2014 at 11:22 PM 0
Share

Hi dansav. I've never gotten the touch plugin to work with the Unity Editor. The plugin requires that you point it to a window name and I've never come up with what that would be while working in the Editor.

If you're having issues with your builds, then you may need to check a couple things. One is making sure that you are setting the "Product Name" in the Unity PlayerSettings the same as the string that you're passing to the plugin. The plugin looks for a window name of that string to retrieve touch data from.

alt text

avatar image dansav · Dec 25, 2014 at 01:51 AM 0
Share

Thanks for that tip. $$anonymous$$aybe I could change his VS plugin code that compares the name. It's either pData->pName, or NewName that is the name of the window? $$anonymous$$now of anyway to send the names back to unity?

BOOL CALLBAC$$anonymous$$ EnumWindowsFunc( In HWND hwnd, In LPARA$$anonymous$$ lParam ) { tWindowData pData = (tWindowData )lParam; char NewName[128]; GetWindowText(hwnd, NewName, 128); if (!strcmp(pData->pName, NewName)) { pData->Handle = hwnd; return false; } return true;

}

Is there a way to send a Debug.Log to unity from the dll? If so I could Debug.Log all the windows names.

avatar image kilgore · Dec 25, 2014 at 04:37 PM 1
Share

I've used powershell and cmd to trace all the Window names but none of them worked for the editor.

You don't have to change anything about the pluginto get it to work for builds though. You just need to pass it the name of the window you want to use with the Initialise function. So if you wanted to Initialize the plugin with a window name of "$$anonymous$$yGame", you'd Initialise("$$anonymous$$yGame");. Check out the images below, they give you example code from Steve Hughes blog that should clear things up.

alt text

alt text

avatar image dansav · Dec 25, 2014 at 11:13 PM 0
Share

Thanks. I have the scene and project named TouchTest and that's the Str in the code also. I was able to get it working in a build, but at first it said Number of Touches= 128 in the Editor. Then mysteriously after doing a build it changed to the correct amount. It would still be nice to get the editor working, but it sounds like you've tried everything possible already. I tried a few other solutions in the asset store but most of the authors have disappeared.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Touch Input in Editor | Microsoft Surface Pro 4 0 Answers

Does Win7 multitouch work in Unity 3.4+ or not? 0 Answers

Maximizing undocked game tab (Windows 10) 0 Answers

Overall quality became worse after changing to Windows from Mac 1 Answer

Windows Multitouch Fail 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges