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
by user 456226577798135808
kipash
(kipash)
April 15, 2023, 12:00am
3
Hey Did you add the NPM package to the project?
kipash
(kipash)
April 15, 2023, 12:00am
5
Here on the EXport Info componenet.
kipash
(kipash)
April 15, 2023, 12:00am
6
Although, you should find the scripts in unity already Mainly since you copied the .codegen
which contains the generated cs files.
kipash
(kipash)
April 15, 2023, 12:00am
7
Do you have compilation erorrs?
kipash
(kipash)
April 15, 2023, 12:00am
8
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
by user 456226577798135808
to figure out how it works is harder than it seems
by user 456226577798135808
kipash
(kipash)
April 15, 2023, 12:00am
12
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
kipash
(kipash)
April 15, 2023, 12:00am
15
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
by user 456226577798135808
kipash
(kipash)
April 15, 2023, 12:00am
18
Best would be to open the Hotspots scene from the samples
kipash
(kipash)
April 15, 2023, 12:00am
19
and you can simply copy paste the objects to your scene