- Home /
How to connect a script to another script that is attached to a gameObject
I have an Inventory at my game, and if pick an Item it will go to the inventory but when I drag and drop the item I want the script to setactive to true an object that the script is attached to but if I find object with tag it drops all the item I pick up.hope you guys understand.
Well you need to store a reference of the item you're currently dragging. And use that reference to set it active.
when i create a gameobject and put my script into a component i dont have "object to find"
Answer by Disco18 · Jun 03, 2018 at 10:38 AM
Is this what you're looking for?
https://answers.unity.com/questions/63922/how-do-you-access-a-script-attached-to-another-obj.html
Answer by Jcrack2882 · Jun 07, 2018 at 05:24 AM
yea but if I find the tag it will detect all of my items that has a tag.