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 nithinkumar · Dec 07, 2019 at 08:47 PM · scripting beginnerprefabsprefab-instance

Problem with player prefab

I have a player gameobject which when collides with other powerup gameobjects gets special powers, but if convert the player gameobject into a prefab the powerup gameobject is just passing through the player gameobject.

can anyone help me?

Comment
Add comment · Show 4
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 Fariborzzn · Dec 07, 2019 at 08:53 PM 0
Share

Select Yourprefab And $$anonymous$$ake Sure It Has Collider Component $$anonymous$$ake Sure In Collider Property In Trigger Is Not Checked(False)

avatar image nithinkumar Fariborzzn · Dec 07, 2019 at 08:59 PM 0
Share

I have box collider 2d , it's still the same

avatar image Fariborzzn nithinkumar · Dec 07, 2019 at 09:16 PM 0
Share

Can You Post Picture Of Your Prefab Inspector?

avatar image Larry-Dietz · Dec 07, 2019 at 09:03 PM 0
Share

Put a Debug.Log statement in you OnCollisionEnter2D (or OnTriggerEnter2D if using a trigger) just to verify if the event is firing or not. That would be my first step in troubleshooting it.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by nithinkumar · Dec 07, 2019 at 09:25 PM

here are the screenshots


screenshot-62.png (484.8 kB)
screenshot-61.png (487.8 kB)
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 Fariborzzn · Dec 07, 2019 at 09:33 PM 0
Share

So It Seems Okay.. So For Identify a Coilliding 2 GameObject Should Have Colider Component And Atleast One Of Them Shoud Have Rigidbody Check Your PowerUp GameObject and Check Your Offset of Box Collider 2d $$anonymous$$ake Sure Colider Is around Your GameObject Perfectly..

avatar image nithinkumar · Dec 07, 2019 at 09:42 PM 0
Share

If I don't convert the gameobject into a prefab it is working perfectly, once i convert it into prefab and instantiate it is not working.

avatar image
0

Answer by Larry-Dietz · Jan 17, 2020 at 11:46 PM

The first thing that comes to mind right now, would be if you are checking for the object by name instead of tag, etc.. then the name of the prefab when instantiated, unless you change it after instantiation, will have clone added to the name.

If this is not the case, post your collision code so we can see what is going on.

-Larry

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

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

PrefabUtility doesn´t work 0 Answers

How to instantiate a prefab declared in one script, from another script 2 Answers

Counting prefabs in screen?,Problem with counting prefabs in screen 1 Answer

Running scripts from editor 1 Answer

Hiding gameobjects in hierarchy make it less expensive ? 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