How to use AudioClips?

Put a comment with //@type UnityEngine.SceneManager above the field. https://engine.needle.tools/docs/controlling-component-generation

like this?

@serializable()
//@type UnityEngine.SceneManager
private sceneManager: SceneManager

Didnt seem to work. Also, that link doesnt work for me

by user 352282921056468993

Above @serializable i think

Oh strange, on second

hmm thought this would work, but didnt:

// @type UnityEngine.SceneManagement.SceneManager
@serializable()
private sceneManager: SceneManager

by user 352282921056468993

Oh did i misunderstand? Undefined in the browser or unity?

@serializable(SceneManager)

Is what you need too of the scene manager is a component that you made

See Scripting Introduction | Needle Engine Documentation

ive never seen SceneManager used as a field, so maybe that’s related. It’s always used as SceneManager.LoadScene(“scenename”) - in c# at least

by user 352282921056468993

undefined in browser

by user 352282921056468993

Did you make a class named scene manager?

Otherwise what we have is a SceneSwitcher

Ok sorry then i misunderstood you earlier, i thought you didnt get the correct field in the Unity component generated

I didnt make a class no. Is it correct that you can use any C# unity import (like SceneManager) as long as you use this format? i may misunderstand that.

So if i look at code for a non-needle project - any of the stuff being imported can be used in a TS needle script, as long as the format you gave is used?

by user 352282921056468993

We dont export C# code so you cant import unity c# classes like that and use them in the browser - it only exports their data! Sorry if this was misleading

You may want to read this intro: Scripting Introduction | Needle Engine Documentation