Hi… is it possible to go to a URL via clicking on an object in a scene?
by user 908977119781060648
Hi… is it possible to go to a URL via clicking on an object in a scene?
by user 908977119781060648
Sure, you can use the button component to call a method that opens a url or use this script here Script Examples | Needle Engine Documentation
For opening a url see Window open() Method
Fabulous! Big thanks, as ever, @marcel
by user 908977119781060648
Hmmmmmm… okay, it seems that the above is a variation on things I’ve already tried but which I can’t get to work. Which, sadly, is still the case… meaning I’m either getting things wrong, or putting them in the wrong place. Or both
No worries… I’ll keep trying
by user 908977119781060648
Which part doesn’t work? Any errors you’re getting?
Hi @herbst​:cactus: … I’m not even getting as far as any errors I’m obviously way off track with regard to what I’m supposed to be doing or where it’s all supposed to go.
Please don’t worry about it… I’ll get there in the end… eventually… probably…
by user 908977119781060648
I’m nothing if not determined
by user 908977119781060648
What part are you struggling with?
Okay well the following screenshots detail one of the things I’ve tried but have failed to make work. The script was made by following a YT tut but I’m pretty sure I’m on the wrong track with it. Either that or I’m attaching it to the wrong thing.
As said, I really don’t know my way around Unity at all, so please don’t worry about devoting any time to this. I just need to learn more … and unfortunately at the moment I’m being screamed at to get back to work
so I’m afraid Unity ‘fun’ will have to wait… for now
by user 908977119781060648
You’ll have to make a TypeScript component so that your code is run on the web - C# code from Unity isn’t automatically converted to something running on the web.
Have you done that before? If not, here’s docs on how to get started: Needle Engine Scripting | Needle Engine Documentation
And there’s also a video: https://www.youtube.com/watch?v=uf5UK0bLHlY&t=5s&ab_channel=Needle
Cheers @herbst​:cactus: … I’ve watched and have a bit of experience creating ts scripts based on the above. However, I hadn’t fully grasped the significance of Unity not automatically converting c# to web stuff. Many thanks
by user 908977119781060648
I’ll keep working on it all
by user 908977119781060648
Yes, with Needle Engine it’s the other way around: you write the TypeScript component and we auto-generate the Unity component for it so that you can add it to objects and set parameters etc.
Yaaaaaaaaaaaaaaaaay! I’ve got it working!
Cheers both of you ( @herbst🌵 @marcel )!
Onwards and upwards
by user 908977119781060648
Congrats