HotSpots - Need help!

Hello Needle Community!
Today I’ve found the HotSpot template but I have a question to the implemenation.
I have added the files from the GitHub (needle-engine-samples/package/Runtime/Hotspots at main · needle-tools/needle-engine-samples · GitHub) to my project into src.
(For ex. I added everything from scripts to scripts)

Now I jsut have the problem that I can’t find the scripts in unity. If I create a sample script I’m seeing it but the ones from Hotspots I can’t see.
Am I implementing something wrong?

Thanks for your help!

Original Post on Discord

by user 456226577798135808

That’s inside my scripts
image.png

by user 456226577798135808

Hey :wave: Did you add the NPM package to the project?

Here on the EXport Info componenet.

Although, you should find the scripts in unity already :confused: Mainly since you copied the .codegen which contains the generated cs files.

Do you have compilation erorrs?

That means, any errors that arepersistent in the unity console? (even after you hit clear)

Adding the npmDef depend. worked!
Thank you very much.

Now I got the scripts in unity.

I just need to figure out now how to use hotspots :slightly_smiling_face:

by user 456226577798135808

to figure out how it works is harder than it seems

by user 456226577798135808

oh, is it?

You should have a HotspotManager in the scene and that should reference a Hotspot Behaviour which is taken as a template and is duplicated for every hotspot.

Then a Hotspot which defines the settings for a single hotspot, you can have multiple Hotspots.

unity scene, ye?

by user 456226577798135808

Ask away, ready to help.

what doesn’t make sense or what doesn’t work

How do I add the hotspotmanager to the scene in unity?
Haven’t worked much with unity yet.

I now got the scripts in unity :man_shrugging:t3:

by user 456226577798135808

ah gotcha :+1:

Best would be to open the Hotspots scene from the samples

and you can simply copy paste the objects to your scene

image.png