#Open Link
1 messages · Page 1 of 1 (latest)
Sure, you can use the button component to call a method that opens a url or use this script here https://engine.needle.tools/docs/scripting-examples.html#receive-clicks-on-objects
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development, and can be deployed anywhere. It is flexible, extensible, and collaboration and XR come naturally. Needle Exporter for Unity bridges the Unity Editor and the web runtime. It helps you to export your assets, animations, lightmaps and so on to the web. It is...
For opening a url see https://www.w3schools.com/jsref/met_win_open.asp
Fabulous! Big thanks, as ever, @old raven 🙂 👍
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 🙂
Which part doesn't work? Any errors you're getting?
Hi @glossy turret ... 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... 😅
I'm nothing if not determined 🙂
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 😊
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: https://engine.needle.tools/docs/scripting.html#creating-a-new-component
And there's also a video: https://www.youtube.com/watch?v=uf5UK0bLHlY&t=5s&ab_channel=Needle
This video gives a short introduction to the easiest and fastest way to create custom Needle Engine components in Unity
📚 Documentation: https://docs.needle.tools
✨ Website: https://needle.tools
💬 Discord: https://discord.needle.tools
#threejs #webgl #webxr #unity
Cheers @glossy turret ... 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 👍
I'll keep working on it all 🙂
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 ( @glossy turret @old raven )!
Onwards and upwards 🚀 😃