[Solved] Linking a Model with code?

I am having trouble finding out how I can link a model with the assetManager. I know how to link a model in the SDK (and the differences between adding and linking), but now I am trying to link a model at run time for use in a level editor tool I’m working on, and I cannot figure out what code I need to use.

Context:
I need to add a radio box option for a model spawning tool, so that the user can decide if they want the models linked, batched, or added. I also need to know how to determine if a model is linked when initially loaded, so that I can flag it as a linked asset in the interface, and ensure it is saved as a link when the scene is re-saved.

Thanks :slightly_smiling_face:

You can use AssetLinkNode

and here is the test:

2 Likes

Thanks, that’s exactly what I was looking for :slightly_smiling_face:

1 Like

And if you wonder how to do X or Y (especially how to find out if it’s AssetLinked or something), you can also always easily look into the SDK Code, which you can almost copy 1:1 for most cases

1 Like