• 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 Pietie · May 22, 2017 at 06:55 PM · textmeshspace

Input.mousePosition, Camera.main to world space

Hi;

How can I check if my mouse is on the linked text? This works only on GUI/Canvas, not in World...

TMP_TextUtilities.FindIntersectingLink(tmp, Input.mousePosition, Camera.main);

Thanks!

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 RobAnthem · May 23, 2017 at 05:43 PM 0
Share

This doesn't make sense, what are you trying to accomplish? The camera and the mouse are in two completely different types of space.

avatar image Pietie RobAnthem · May 23, 2017 at 06:05 PM 0
Share

I am trying to make paper from quad with T$$anonymous$$P as child obj with questions.

Here's my current look of part of my code (unfinished)

 for (int i = 0; i < (result.Length / columnCount); i++)
             drawString += "<b>" + (i+1).ToString() + "; " + result [0 + (columnCount * i)] + "</b>\n<link=\"a1\">a) " + result [2 + (columnCount * i)] + "</link>\tb) " + result [3 + (columnCount * i)] + "\tc) " + result [4 + (columnCount * i)] + "\td) " + result [5 + (columnCount * i)] + "\n\n";
         GetComponent<Text$$anonymous$$eshPro> ().SetText (drawString);
 
 
         int linkId = T$$anonymous$$P_TextUtilities.FindIntersectingLink (GetComponent<Text$$anonymous$$eshPro> (), Input.mousePosition, Camera.main);
 
         if (linkId != -1)
             Debug.Log("Heureka");

But when I move mouse to a) answer it does nothing (but in T$$anonymous$$P debug its correctly framed as I need)

avatar image Pietie Pietie · May 23, 2017 at 06:29 PM 0
Share

alt text

capture.png (268.2 kB)
avatar image Vollmondum · May 23, 2017 at 06:14 PM 0
Share

If you're using text$$anonymous$$esh make sure to attach a text shader to the object, otherwise the text might exist, just hidden under some textures.

avatar image Pietie Vollmondum · May 23, 2017 at 06:20 PM 0
Share

$$anonymous$$y text is shown correctly, just FindIntersectingLink isn't working

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.

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

105 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

Related Questions

TextMeshPro display wrong rotation 1 Answer

URP Postprocessing & TextMesh Pro 1 Answer

How to update TMP Pro Sprite Shader using script/C#? 1 Answer

Text Mesh Pro : How to override standard text styling tags ? (bold, underline, etc ...) 0 Answers

Glow effects and bg texture? 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