Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

IOS touch vs OnMouseDown & error messages

$
0
0
Hey Guys, Currently i have an ios project that uses all OnMouseDown methods instead of specifically touch inputs methods, it seems to work fine and i can test it on the computer and on my iphone. It works great but when i go to build it i get the warning: Game scripts or other custom code contains OnMouse_ event handlers. Presence of such handlers might impact performance on handheld devices. UnityEditor.HostView:OnGUI() This is an example of a raycast im using: void Update(){ if (Input.GetMouseButtonDown(0)){ Ray ray = camera.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)){ objectRayHit = hit.collider.gameObject; if (objectRayHit.name == "1OrangeCube" && DataManagement.datamanagement.playerSuitColor != 1){ DataManagement.datamanagement.playerSuitColor = 1; } and this is an example image of the scene im using this in: ![alt text][1] Why am i getting this error? my game is a very simple game and it seems to work fine but obviously i want to release it with the best coding i can muster. Any help will be greatly appreciated. There is a similar unanswered question here: http://answers.unity3d.com/questions/669282/performance-impact-of-onmouse-event-handlers-on-mo.html [1]: /storage/temp/26110-screen+shot+2014-05-04+at+5.20.17+pm.png

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>