Adding ION assets to unity scene from script

I can add assets to my scene using the ION pop up window in the editor just fine, but I want to be able to select which asset to use while the application is running (ie, in play mode), as can be done with the rest API.

I cannot find any mention of such behavior in either the (admittedly limited) learning documents, nor in the sample scenes. One solution I had in mind was to use a WebView to call JS functions from unity, but this is non-ideal.

Apologies if I’m misunderstanding the question, but this is mainly about getting asset names/IDs so you can plug them into Cesium3DTileset instances you spawn yourself, right? If there’s a REST API that does that, can’t you “just” make UnityWebRequests to it?

Thanks for the reply Tobias, I’ve got it figured out now.

I forgot that the assets spawned from the cesium popup window were just gameobjects with Cesium’s components attached, which I could either instantiate or modify as one usually does. Instead of referencing the properties in the Cesium3DTileset component, I spent a full hour last night looking for a solution to a problem that doesn’t exist.

Kicking myself now, but I’m new to Cesium, so I suppose this is just part of ‘the learning process’.

1 Like