HiGreg
1
How do I initialize CGS2 syncronously from within a non-async function?
If I use await BABYLON.InitializeCSG2Async();, it has to be within an async function. Then that function becomes asyncronous itself, right?
Can I avoid polling with IsCSG2Ready()?
Maybe I misunderstand async/await.
sebavan
2
You can not really convert a promise based code in a synchronous one.
If I use await BABYLON.InitializeCSG2Async(); , it has to be within an async function. Then that function becomes asyncronous itself, right?
Yes and you could also keep the caller sync but in your function do something like:
BABYLON.InitializeCSG2Async()
.then(() => { yourCode(); });
.catch((e) => { yourErrorCode(e); });
kzhsw
3