🧡#Event-System

marwi123

No, it will also be added implicitly if you use components that need it (e.g. an ObjectRaycaster which is required for the IPointerDown etc events)

ronnieweb3

Can i delete the "Scene" object? and start creating what i want? will it still work? or its necessary to keep the "Scene" object? I dont need the multiplayer thing in what I'm making

ronnieweb3

so basically we need a parent object with Gltf script and we can keep the child of that object anything and still it will work?

marwi123

Connect to the same local network and open the ip address the server starts at on your phone

ronnieweb3

hey i made a test sample and then tried playing it on local host and i see that the materials are not appearing on the character,the code i gave to the character and which was working perfectly inside unity is not working and also the character is facing in wrong direction

marwi123

So one big difference is that we're not exporting any code from Unity. If you have custom C# code you would need to translate that to typescript. We have a lot of components converted (like Timeline and Animator for example) which makes a lot possible with just a little bit of scripting or no scripting at all.

What RenderPipeline are you using? Are the materials using custom shaders?

marwi123

That's the same thing - playmaker also just generates code. You can not export code right now at least, no

marwi123

Because it can export and setup models, animations, materials and scripts inside Unity + use a lot of the tools that the Unity Editor provides for building super lightweight web experiences. It doesnt mean that it's feature complete yet πŸ™‚ and maybe we will get some kind of code export but we dont have that right now

ronnieweb3

so basically we cannot do anything related C# or playmaker inside unity and then make it work on the local host? or there is no way to convert those codes automatically in to type script or anything that makes it work on local host?

ronnieweb3

I'm trying to make a mini game feature which would basically represent it like a website, the character walking around with the help of mouse/touch input, interacts with various things and thus gets to know about our project and roadmap, and no i didnt tried the "label" because if i cant make everything work then its no use trying just the materials working or not.

marwi123

Yes but for this you dont need custom code (besides the TV screen maybe which is a sample script)

ronnieweb3

btw do we need to code in type script inside unity to make things work? or it has to be done outside unity?

marwi123

You write the code using your favorite code editor πŸ™‚ we did our best integrating it similarly to how C# in Unity works

ronnieweb3

Would have been nice uf there would have been a tutorial showing how to code as well.. For better understanding of how exactly everything works and what won't work

hybridherbst

Yes, we're working on more video tutorials and so on. We have a lot of samples by now though, that was higher priority, so that people can learn by example.

hybridherbst

One core idea of Needle Engine is fast iteration times, which is why we're explicitly not converting your C# to WASM or something else for the web - this is what makes Unity's WebGL builds so excruciatingly slow (15 minutes vs. a few seconds with Needle Engine to see your content in a browser on any device). Instead, you write TypeScript, which works everywhere, and we're generating Unity components automatically for you that you can use to set up data, connections between components, and so on, as usual. No need to write code twice.

ronnieweb3

Okay but the question is how to write a typescript code that interact with unity, i cant code but if i hire someone to code he should also be able to know how to make the unity interact with TS code

ronnieweb3

I read it and as I'm not a coder so I'm not understanding much out of it.. But does it mean that you can use all the unity components inside TS and thus make everything work via TS which could have been made working by C#?

hybridherbst

Yep, pretty much, that's the idea πŸ™‚ The Needle Engine API roughly matches what's available in Unity (e.g. getComponent, or findObjectOfType, and so on) to make this transition easier.

hybridherbst

Any suggestion for how the docs should start explaining those topics so that it's less confusing to you? Always happy to make that better

ronnieweb3

honestly a easy explanation would be a video where you are starting a project from very scratch without any template and then making some scripts in that video, that would explain about the needle alot

ronnieweb3

Can you tell me how to make the material work on browser? Right now i dont see the materials working, I'm using toony materials one by toony color pro and other one provided by a publisher

hybridherbst

Needle Engine is not a "100% export of every feature that Unity has" tool, it's a fast way to bring content to the web, with a reasonable subset of features supported.

Are these Lit materials? Currenty lit materials are not supported for custom shader export. You can use PBR materials (e.g. URP/Lit, or UnityGltf/PBRGraph) and custom unlit shaders, with custom lit shaders being on the roadmap. This is also in the docs πŸ™‚

hybridherbst

Can you post the shader (and potentially needed textures) here? Will probably only be able to take a look in a few days, Christmas preparations are in full swing here πŸ˜…

hybridherbst

Also, can you check the console in Chrome - if there's anything specific that is unsupported in your shader then it should be logged there.

hybridherbst

Are you sure? "_BumpMap", "_Smoothness" and "_Roughness" do sound like this shader uses lighting.

hybridherbst

Regular camera frustum culling works, occlusion volumes are currently not exported, it's usually only used for very large worlds and on the web you probably want to handle that differently (loading in/out parts)

hybridherbst

Add gifs to what? Yes, you can use gif and the more modern WebP on websites. On 3D objects you can use video textures.

If you're talking about sprite animation, regular sprite sheet animation from Unity can also be exported.

marwi123

Please post in <#1024686103598477383> with your questions so others can see and help too - and use the search, many questions have already been asked πŸ™‚ thanks

ultrakelevra

Hello there! πŸ‘‹ I'm a new user. (Literally 1 hour long user) I've been trying to bring my custom unlit shadergraph to Three and they don't work 😦 ( It does changes though. From the base URP lit to what seems to be the default lit with no fresnel or envirnment light applied) The shadergraph I'm trying to import is very basic. Just a material to show the mesh normals. I've shared it in the image.

marwi123

Great! Worth noting that a lot of that info can be found in the docs or the <#1024686103598477383> πŸ™‚ as felix said: best to ask there (after searching for previous questions πŸ™‚ ) so others can also see it and maybe reply or make use of your solution