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 /
This question was closed Sep 11, 2018 at 03:19 PM by tormentoarmagedoom for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by II_Spoon_II · Sep 11, 2018 at 03:02 PM · detectiondetectdetecting

Detecting gameObjects in certain areas.

I need to detect gameObjects that enter an area (units going into buildings) storing them in an array and set them inactive (setActive(false)). I found a solution for the detection but it was only for colliders (https://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html) I need to detect the whole gameObject so that I can set it inactive. thanks :)

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 hexagonius · Sep 11, 2018 at 03:06 PM 0
Share

I don't understand the problem. create a trigger zone, attach a collider to the gameobject you want to disable and when entering the trigger do it. what exactly is the problem?

avatar image II_Spoon_II hexagonius · Sep 11, 2018 at 03:09 PM 0
Share

Because in the link above, the array stores colliders and not game objects, so if you cant use theArray[i].setActive(false); because it's a collider and not a gameobject

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by tormentoarmagedoom · Sep 11, 2018 at 03:19 PM

Good day.

You are lost my friend... You still need to watch so many tutorials and manuals. Your questions show us you really dont know how to acces, read, and store values and variables..

Realy, go learn about access components, acces values, acces objects, you need it. You are asking a very very basic question....

If you have the collider, you only need to acces its gameobject... and store them ina a Gameobject array.

 collider.gameObject

Post closed. Good bye.

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 hexagonius · Sep 11, 2018 at 06:20 PM 0
Share

accepting your own answer are you? not happening.

avatar image II_Spoon_II · Sep 11, 2018 at 07:05 PM 0
Share

hello, sorry about the question if it was irrelevant, hope it didn't bother u, thanks for the answer

Follow this Question

Answers Answers and Comments

91 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

Related Questions

Need help to detect nearby / adjacent tiles / objects whatever, without collision... HELP,Need help to detect nearby / adjacent objects to make them available for further commands. 0 Answers

help with goal detection system,Goal detection systems not working 1 Answer

Detect touches on the top right corner of the screen 1 Answer

Detecting a certain degree angle? 2 Answers

Is it possible to check collision from another object? 6 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