Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Nethekurse · Apr 13, 2014 at 05:49 AM · unity 2dcollider 2d

Drag and drop Word game

Hi, im using unity 4.3 and making a simple 2d game that have some sprites with words that you need drag and put in the right location in a text to complete the phrase.

Like this:

alt text

My problem is in the left side i have one sprite with one 3D Text, what i need is to create Box colliders 2D in the position of () when i initiate the prefab, there is any way to get the position of () in the 3D Text and create a Box collider ? i cant do this in the editor because the text changes depending on the current level, so will never be the same position.

ex.png (21.8 kB)
Comment
Add comment · Show 3
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 Nethekurse · Apr 13, 2014 at 06:39 AM 0
Share

This only works for GUI text, im using 3D Text that uses a Test $$anonymous$$esh, renderer.bounds could solve my problem but its hard to find the exact location since the text have line breaks.

avatar image MikeNewall · Apr 13, 2014 at 06:47 AM 0
Share

Couldn't you just use a separate text mesh for the underscored part?

avatar image Nethekurse · Apr 13, 2014 at 07:57 AM 0
Share

I will try that, but can i concatenate string from differents text mesh? like a underscored part in the middle of the text.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Nethekurse · Apr 14, 2014 at 12:49 PM

One solution that i found its get the String that contains the text, split by words and create a new 3D Text for each word with a 2d collider, and then align the words as a normal text, but i dont have any idea how i can implement this in C#.

Comment
Add comment · 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

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

22 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

Related Questions

Unity 2D: sprite's rigidbody weight/rotation 0 Answers

Unity 4.3, generate 2d mesh 2 Answers

How to get correct scale for CircleCollider2D radius? 4 Answers

Joint2D Tutorials 1 Answer

2D Physics and Jump-Through Platforms 2 Answers


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