Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 prototyped · Feb 18, 2019 at 07:59 PM · camerashadercanvasuser interfacedrag-and-drop

Screen space camera makes unity UI object loose track of mouse.

So im making a card game and I have to use screen space camera or overlay, just something to give the board a tilt back look. anyway, when I click and drag a card (made with unity UI) the card looks bigger than it needs to be and the card isnt on the mouse its somewhere else in the scene but it still knows its getting dragged please send help!!!!

edit: when you look at it on scene its fits in the cell you want it to, but on game its off

alt text

alt text

screen-shot-2019-02-18-at-32802-pm.png (162.9 kB)
screen-shot-2019-02-18-at-32810-pm.png (344.0 kB)
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 zereda-games · Feb 18, 2019 at 09:03 PM 0
Share

so what object are you scaling size with when doing these two different images? to me it appears the 1 set of images remain the same the background is scaling bigger and smaller. I'd try to place all the objects on the background and try and scale again. the background should be on a canvas

alt text

exampleforweb.jpg (13.3 kB)
avatar image zereda-games zereda-games · Feb 18, 2019 at 09:18 PM 0
Share

I was having a scaling issue with my title when scaling it was moving up and down and not staying in place, to fix i placed on an empty game object and locked that objects pivot to top and center, then the title text components is expanded to full on that game objects position. How i did this was the object was placed on my background in the same position as my current text component position, i just copied the transform and pasted it on empty object. Then i dragged my title text onto it and reset it to 0,0,0,0. The perimeter is where i want my whole text component to display. The size i wanted was as wide as my canvas and 1/4 the top of it, so i could use this obj as a boundary area. that solved my title problem. title remained at top and scaled with canvas along with the buttons, though because the buttons are not on objects like the title, the don't scale the same, but the effect i personally was looking for.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by prototyped · Feb 19, 2019 at 02:52 AM

did more digging found this link to be more than helpful https://answers.unity.com/questions/1063429/problem-moving-a-gameobject-with-an-ondrag-event-w.html

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 zereda-games · Feb 19, 2019 at 08:16 AM 1
Share

Glad you could find a solution. there are many ways to do things, it's just which way works best for you.

avatar image zereda-games zereda-games · Feb 19, 2019 at 08:20 AM 1
Share

Also more on this in this question from the day before you

https://answers.unity.com/questions/1602884/scale-ui-text.html?childToView=1602982#answer-1602982

avatar image
1

Answer by zereda-games · Feb 18, 2019 at 08:18 PM

This can be cause when a parent of a child is change in size and the children are set to expand with the parent by means of it's Pivot Points If you don't want it to scale to the parent have the local Anchor centered, otherwise adjust the Anchors to where it works for your purposes.

Comment
Add comment · Show 1 · 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 prototyped · Feb 18, 2019 at 08:30 PM 0
Share

Okay so in scene it is lined up fine in game its not heres some shots ill also update the question and thanks for the fast reply.

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

213 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 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

Camera preview different from when actually running the game? 0 Answers

Why use different Canvas Render Modes 0 Answers

Keep camera perfectly in box and scaled to fit view 0 Answers

How to render canvas with screen space - camera on top of canvas with screen space - overlay? 2 Answers

Canvas is hiding my 3D model, can I place the model in front of the canvas? 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