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 SuhailAlhegry · Jul 10, 2017 at 07:47 PM · editorrendererlayersnavigationclickable

I want to make objects invisible but interactive with input!

Hey, I recently found a way to move my player (Which is just a cube in the mean time!) through clickable nodes. I set nodes in a separate layer so I can hide it from renderer, but then all the functionality is gone!

I want to make the custom nodes invincible, but interactive, I also don't want to reduce performance by disabling the mesh renderer of the objects using script, cause the game will be on mobile devices.

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 Jwizard93 · Jul 10, 2017 at 08:18 PM 0
Share

Can you post your code. Any solution will likely depend on how the objects are meant to interact. Which we don;t know without your code.

avatar image SuhailAlhegry Jwizard93 · Jul 11, 2017 at 12:52 PM 0
Share

It's just a very simple On$$anonymous$$ouseDown() method on the custom nodes. It's no big deal, but I want the colliders only to be there without the mesh.

     void On$$anonymous$$ouseDown () {
         Debug.Log ("Clicked!");
         player.position = Vector3.$$anonymous$$oveTowards (player.position, parentCube.position, PathLength();
     }

3 Replies

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

Answer by SuhailAlhegry · Jul 11, 2017 at 04:04 PM

Thank you all, but I found the solution. I just added a script to disable all mesh renderers in the scene under the tagged objects (Which in this case are "Nodes") in Awake(), and added a loading screen to hide that operation.

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

Answer by webcam · Jul 10, 2017 at 08:33 PM

Can you just remove the mesh renderer all together? Sounds like all you need is the collider for the click event.

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 SuhailAlhegry · Jul 11, 2017 at 12:41 PM 0
Share

I already thought of that, but doesn't it reduce performance?. also removing mesh renderer will hide the nodes in the editor! I want a solution that shows them in editor but not in renderer.

avatar image
1

Answer by toddisarockstar · Jul 11, 2017 at 01:32 PM

         //if you dont want to do this:
         transform.renderer.enabled = false;
 
         //you can do this instead:
         transform.renderer.material.shader=Shader.Find("Transparent/Diffuse");
         transform.renderer.material.color = Color.clear;
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

87 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

Related Questions

Sortlayer Renderer Extension 1 Answer

Clickable empty GameObject in the editor 3 Answers

Check if Layer is hidden or locked in editor 0 Answers

Change editor to use Z-axis as vertical 2 Answers

Select un-selectable Objects with mouse. 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