HubDoor in 2D Game kit- Trying to make a door open after collecting 3 items

I am currently going through the 2D Game Kit tutorial and package, and I am trying to create a door on my level that opens after collecting 3 keys (items). I have tried following the HubDoor guide:

https://unity3d.com/learn/tutorials/projects/2d-game-kit/hubdoor?playlist=49633

I have followed the instructions on my own door, and have connected the three keys. I was wondering what I am missing to get the event of the door opening to trigger once I do collect them, when I walk up to it. This is my current script. The door sprites will not change when I pick up a key either.


I am just starting out on Unity and this would help me out a lot, thank you!

looks like the Key Director Trigger is missing in the inspector, drag it onto the spot that says None. does your animator control that? i need more details like actual code not a visual ref of the inspector. that doesn’t tell me much.

Hi zoeroseart,

Have you tried applying this component onto the hub door sprite itself(HubDoor0.sprite). it won’t work on it’s parent that holds the animator.

It is looking for the component Sprite Renderer applied on the sprite:)

Hope this helps!