• 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 Leia · Aug 30, 2018 at 01:51 AM · unity 5build-errordrag-and-drop

IDragHandler works in Editor but not in Final Build

Hi there - I am in urgent need of help.

My IDragHandler works perfectly within the Unity editor. However, the minute I build the game, it ceases to function. It no longer registers my clicks.

I am using an EventSystem on the Canvas. I have tried adding 2D Raycast to the Camera - neither of these things work.

Comment
Add comment · Show 2
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 niiicolai · Aug 30, 2018 at 07:30 AM 0
Share

Just a wild guess. Haven't been having this problem myself before. But i had som problems with some other functionality didn't work on IOS after build because it got stripped. You should checkout https://docs.unity3d.com/$$anonymous$$anual/IL2CPP-BytecodeStripping.html - $$anonymous$$aybe that can help.

avatar image Sergey78 · Oct 23, 2018 at 08:37 PM 0
Share

I have same issue. Have you found the solution?

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Leia · Oct 23, 2018 at 08:45 PM

Hey @niiicolai ! Sorry for the super late reply I only saw this now ;-; don't worry - I fixed it another way but thank you so much for the help :)

@Sergey78 Hey there! Sorry - I should have actually answered this earlier. For me, I realised I had another UI element in the scene which covered the whole screen and was blocking off my access to the drag elements behind it. The element was my Fade Canvas - with the canvas group that let me fade in between scenes. Even though its alpha was at 0, rendering it invisible, it still appeared in front of my drag UI elements after I built it.

If you have any other UI elements in the scene, try changing the sort order so that your IDrag elements appear in front of all the others. Hope that helps! Let me know if I can help with anything further :)

Comment
Add comment · Show 2 · Share
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 Sergey78 · Oct 23, 2018 at 09:52 PM 0
Share

But why it worked in editor. I have tried to remove all UI elements except the element witch I wanted to drag but it didn't work.

avatar image Leia Sergey78 · Oct 24, 2018 at 07:17 AM 0
Share

Shoot! Then I'm not sure - sorry ;-; If you have more than one canvas in your scene though that might also be causing problems?

I think the reason it worked in the editor for me but not in the build is because my two elements were on the same sorting layer - which meant it was almost arbitrary which one got sorted to the front. When Unity builds a game, the UI elements tend to get messed up - so I think it decided to place my Fade in front of the drag objects.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

181 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 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Failed to re - package resources Unity 5.4.3f1 0 Answers

Unity 5 White terrain after build 0 Answers

unity 5.2.4 iOS build error ,iOS build error 0 Answers

Failed to re-package resources 3 Answers

Unity iOS Build Bitcode Issue 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