This station article is Fred Himi original, reproduced must be clearly noted: (The author Sina Weibo: @ Li Himi ) reprinted from Original link: http://www.himigame.com/unity3d-game/1618.html
click Subscribe span> this blog latest news! Notify you of the latest blog post in time!
In recent weeks the basic two days pass a night, the whole team is trying to drive out a version of the technology to delete the test package, there is no time to write something. Just a little bit of time today to sort it out.
This article mainly Uniyt project build to the iphone after the operation does not normally trigger Collider this issue.
Generally we know that if the listener event cannot be triggered normally, there are a few things:
1. No Collider added
2. The dimensions of the mounted Collider are not aligned with go.
3. Blocked by other formation, the incident was intercepted
So what if an event is normally responded to in Unity Editor (and there are no 3 cases of checking collider), and compiling to iphone does not trigger the event properly, how do I fix it?
Himi first give a picture:
650) this.width=650; "class=" Alignnone wp-image-1620 size-full "src=" http://www.himigame.com/wp-content/uploads/ 2015/05/0523185110.png "alt=" 0523185110 "width=" 305 "height=" 559 "style=" border:1px solid rgb (153,153,153); margin:0 Px;padding:4px;height:auto; "/>
As you can see, a box Collider property of the Widget is checked, so when the runtime, the box Collider this build regardless of its size, will be triggered by default its size to match the widget size.
but! If you just tick the widget box Collider and don't check box Collider If the size of this build is the same (for example, the widget size is 110x110,box Collider size is 0,0), though the unity Normal use in Editor ~ ~ but when the project compiles iOS project to run to iphone, it will appear the abnormal response triggered this collider!!
The reason does not know whether it is unity bug, if just tick the Widget Box Collider property, and the box collider size settings inconsistent, on the iphone and win will be the issue can not be triggered.
I do not know whether this problem is related to the Unity3d version, the current version I am using is 4.6.4f1
"Unity3d Game development Eight" unity compiled to iphone running Collider does not trigger event solution properly