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