Hi, how do I set in hotspot in inspector to use object on player (when player is a prefab and not in scene)? I want to have three options for inventory item examine, and use with scene object (which both work) but as I cannot have use on inventory item also (as this stops drag or click item to use in scene) I need another way to use item with my player.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You can attach a Hotspot component to your Player as normal - but as its a prefab, it's Interaction ActionLists will need to be asset files.
At the top of the Hotspot Inspector, set the Interaction source to Asset File, and it'll rely on asset files instead of scene-based Interactions.
Got it!
So I have put a hotspot component on the Player parent, set it as asset, but nothing happens when dragging the inventory item onto the player
Hotspots require a collider to be interactive.
If the Player has one, share screens of the Inspector.
Sure, I put a box collider 2d on the parent object with the hotspot on, and if is trigger is not ticked my player spins round like a crazy man. With ticked the there is still no response:
https://www.dropbox.com/sh/0z634pzdurimvy0/AABjIhVPxdWfsKVtTfcLGTNla?dl=0
Please don't crop your screenshots.
The Hotspot collider must be a trigger, and must be on the Default layer.
If it's on the root object, uncheck Turn root object in 3D? in the Player's Inspector. Otherwise, place the collider + Hotspot on the Player's sprite child.
Still nothing. See uncropped screenshot.
https://www.dropbox.com/s/r6bnj61w6yobecs/StillNothing.png?dl=0
I need to see the full Inspector. Including the entire Hotspot component, and the layer that the object is in.
Does the Hotspot label appear when over the Player?
Hi, it doesn't:
here you go:
https://www.dropbox.com/s/2u7fsp9j1idrap9/HotspotPlayerSpriteFullIspector.png?dl=0
It must be on the Default layer.
Do you mean the Layer of the Sprite gameobject child needs to be set to Default?
Yes. For a Hotspot to be interactive, its GameObject must be placed on the Default layer.
I have changed it but it still doesn't work! Yellow cube doesn't show, don't know if that's anything to do with it:
See screenshot
https://www.dropbox.com/s/9pf13dq9cewtxgt/PlayerHotspotIssue.png?dl=0
The yellow cube was showing earlier - what change did you make since?
I can't see any issue with the Inspector now. Did you uncheck "Turn root object in 3D?"?
PM me the Player prefab file and I'll take a look.
ok will do thanks
Hey Chris, replied to inbox discussion on this topic, if you get a chance to check it out
The images you shared had no information I could use to determine the cause, and I've already tested your prefab on my end without issue.
Hi, Here are more images of the Player Root and child (with hotspot on) whilst game is in play:
https://www.dropbox.com/sh/q9xnlanggbmq8wm/AACm5Rhd4IznSWXCWJMc7yJwa?dl=0