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 pretender · Aug 16, 2010 at 10:38 AM · hierarchyurllink

link that point to objects

i am trying to build hierarchy from object that has a lot of subobjects in a way that i get this displayed:

"main object > object1 > subobject2"

where all parts act as links, when clicked that object gets selected. how to do that?

to additionaly explain:

i know how to build hierarchy in the editor. just stack one object on top another. that is not the problem.i know how to loop through the object and get children, so if i select one of the children i get label on the screen something like this: main object > sub object > object (object that is selected).. i know how to do all of this. i would like to make the objects in the label clickable, so when clicked the current camera target changes to clicked object.

maybe to have array of buttons where titles of the buttons would be the objects and when button clicked it will select the object...

can it be done like this?

Comment
Add comment · Show 1
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 jashan · Aug 16, 2010 at 11:07 AM 0
Share

Do you mean that you click on one object and then another object gets selected? That's not possible in Unity.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jashan · Aug 16, 2010 at 11:11 AM

If I understand your question correctly (see my comment), then there's bad news because Unity doesn't support "links". So, clicking on one object in the hierarchy and selecting another one is not possible. Creating a hierarchy of objects, on the other hand, is trivial (just drag'n'drop the objects one below the other).

Also, you could write an editor script that adds a button to your "hierarchy objects" which then selects the "original objects". So, you'd have scripts attached to those "hierarchy objects" which have a "slot" for the linked object. That would be trivial:

public class HierarchyObject : MonoBehaviour {
    public Transform linkedObject;
}

The editor script would be a bit more complex ... let me know if that's what you need and I can extend the answer with it ... basically, what you'd get is this:

Click on the object in your hierarchy to select. Click on button in property inspector (the button comes from the editor script) to select "original object".

I'm not perfectly sure that it'll work but almost perfectly sure ;-)

;-)

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 pretender · Aug 16, 2010 at 08:36 PM 0
Share

i dont need editor script, i just want to simulate links, and i got this idea to do it with buttons. so when i select object in the game, i get its hierarchy path (i dont know how to do this yet) and then i make buttons that selects objects in the path when clicked

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

No one has followed this question yet.

Related Questions

Can I place a link (such as ) into the GUI.Label? 4 Answers

Dynamic link url and text in WebGL build 2 Answers

Button Link Page web 2 Answers

How do I put a link to a website when I click with the mouse an object or word? 6 Answers

Build URL for app on GooglePlay and AppStore 0 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