I just started to learn Babylon JS + Unity exporter. I watched video tutorials (rotating cube).
However, I couldn’t find few things.
Script component - So in Unity when I try to make mesh component script, it doesn’t have. So I made script using “Script components” instead. is it fine?
on Rotator.ts
in the update funciton,
“this.mesh.rotation.y” is not working. is there any new wait to access the unity gameObject components (Mesh) ?
on Unity, I can’t add "using Unity3D2Babylon " anymore.
Documenttation for the new version has not been updated yet. But basically… There is NO Mesh, Camera or Light component any more… There is just the BABYLON.ScriptComponent
The script component has a transform so to move a transform from script
this.transform.position.z += 0.25;
Take a look at the video from this thread… i setup a new project and bake light
So while transform.rotationQuaternion is not null… transform.rotation is ignored
So can update transform.rotation from the transform.rotationQuaternion.toEularAngles and then null transform.rotationQuaternion = null in the awake function … then your code will work
Hi @MackeyK24
I am upgrading a Unity Babylon project to a newer version of Unity and Babylon Toolkit, but I’m encountering several errors related to deprecated namespaces and classes.
Project Details (Before & After Upgrade):
Previous Version (Working Setup):
Babylon Toolkit: 4
Unity Version: 2019.4.40f1
Current Version (After Upgrade):
Babylon Toolkit: 7.50.1 (Professional Edition)
Unity Version: 2022.3.58f1 Issue: Unity3D2Babylon Namespace & BabylonExporterWindow Causing errors
After upgrading, I’m facing a lot of compilation errors, but most of them are due to the removal of the Unity3D2Babylon namespace. This namespace was heavily used in the project, and I believe it has been deprecated.
I have already replaced occurrences of BABYLON.MeshComponent with TOOLKIT.ScriptComponent, which resolved some errors. However, all scripts using Unity3D2Babylon and its related methods & classes (especially BabylonExporterWindow) are still causing major issues.
What I Need Help With:
What is the alternative namespace to Unity3D2Babylon in Babylon Toolkit 7.50.1 that provides the same functionality?
What should I use instead of Unity3D2Babylon.BabylonExporterWindow?
Is BabylonAttribute the correct replacement?
I saw some references saying BabylonAttribute should resolve my issues.
However, I couldn’t add BabylonAttribute to my project.
I tried installing it via npm, but it did not work.
Could you please suggest the correct replacement for Unity3D2Babylon and guide me through adding the required packages to my project properly?