createUnityInstance now returns a Promise, you need to add “.then((unityInstance) => {… do something with it …})” after it and continue a chain from there. More info on promises can be found here: JavaScript Promises: an introduction | Articles | web.dev.
The reason you’re seeing the object function, but it says undefined when logging is because promises do not resolve immediately. If you log the variable immediately after the promise, it will be undefined as the Promise has not resolved yet. It will show up in the console, but with a small “i” next to it which will indicate the browser “filled it in when it eventually became available afterwards”. It’s a useful browser feature which can surely trip you up if you don’t understand how promises work.
See this link for all other info on how to migrate: Changes to the WebGL loader and templates introduced in Unity 2020.1