photo

[2.10 Entertainment] Can't create NodeReference from FBX file

Recommended Posts

Hi,
I've imported FBX file in Editor, it's directly in my data folder:

image.png.f1ad05c9f78dba93a66172eb50bf5b2f.png

Now in my AppWorldLogic::update method I want to create NodeReference to this asset:

Unigine::NodeReferencePtr nodeRef = Unigine::NodeReference::create( "Test.fbx" );

But calling this line of code is always getting me this group of errors:

image.png.194d18ba5bd16b4ed03b8d9dbbdb95e2.png

If I call getReference() on this node ref I've created, I'm getting null pointer.

It has been working on 2.7.2 Entertainment version, now on 2.10 Entertainment I can't make it works.

How can I fix this in 2.10?

Share this post


Link to post

Bump!

Anyone can help me with this? 

Share this post


Link to post

Hi,

We checked the same code in 2.10 and it worked as expected, NodeReference was created, no errors written.

Could you build a small test scene with this fbx and your code?

Pay attention that your fbx can't be loaded because of XML error. Probably, the file is broken. Try another one.

Thanks.

Share this post


Link to post

Here is minimal test project for this.

FbxTest210.zip

Share this post


Link to post
Posted (edited)

Bumping again!
Any conclusions from my test project?
I have 20 animated fbx files in my project and with all of them I have this problem. On 2.7.2 they worked without any problem, so why now they are somehow broken?

Edited by arzezniczak

Share this post


Link to post

Have you launched editor after the upgrade to 2.10.0.2?

We checked your scene it works as expected — node is created.

image_2020_06_19T11_22_17_664Z.png

Share this post


Link to post

This sample project was created in 2.10 version, my real project was upgraded from 2.7.2 straight to 2.10.

Share this post


Link to post

After upgrade from 2.7.2 to 2.10 you need to start Editor to generate and update runtimes and missing files. If this doesn't help, could you please attach a non-working project after upgrade?

Right now it's hard to understand what is going on.

Thanks!

Share this post


Link to post

I am 100% sure that I have started Editor to create build, since on 2.10 assemble option is in Editor, not in Browser SDK anymore.

Anyway - here is another test project, I'm also including assembled build of it where this error appears. This project I created in 2.7.2 and then upgraded straight to 2.10 version.
Interesting thing - in migration log there are errors about node, anim, dds and mesh runtime files:

failed to load "D:/WORK/Projects/Unigine/27_210_upgrade/data/.runtimes/79/7945639da80dc70dbd347021f8ca4c0d2615a1e9.node.meta"
failed to load "D:/WORK/Projects/Unigine/27_210_upgrade/data/.runtimes/97/97a1db3c51c0b6365af1ed5f03892806934810ef.anim.meta"
failed to load "D:/WORK/Projects/Unigine/27_210_upgrade/data/.runtimes/9e/9e2dec760355014df36e31a3d8e5a0709f8c3679.dds.meta"
failed to load "D:/WORK/Projects/Unigine/27_210_upgrade/data/.runtimes/b3/b3a0baaf49d8592d912f4889620bc4acb8eb756f.mesh.meta"

I opened Editor, inserted this fbx into world and then deleted it (since in my original project I have basicaly empty scene, everything is added at runtime) and then I hit Create build option and you have result of it in this pack too - same error as in my previous sample.

I hope this time you will be able to recreate this, at least you should see same error in assembled project. 

 

27_210_upgrade.zip

Share this post


Link to post

To fix this you need to copy guids.db from the 27_210_upgrade/data to the 27_210_upgrade_build/data. It looks that there are a lot of missing guids here, that's why you have all these errors on startup.

  • Like 1

Share this post


Link to post
Posted (edited)

It works!
Thank you!

Is this my fault, should I do something differently or it's just how it works now?

Edited by arzezniczak

Share this post


Link to post

If that guids.db file is automatically generated on project build - it looks like a bug, we need to take a closer look at it. Current build system works better with C# project, C++ improvements will be introduced later (maybe even next year).

Share this post


Link to post