Loading new scene

I want to load completely new level in unity by pressing a button, how can i do that? Anyone did this?

Original Post on Discord

by user 697872771497328640

I mean is there any methods or something in needle? or I should use options from unity

by user 697872771497328640

Hi, you can use the SceneSwitcher component for this. Your main scene could be empty with just that component which can be used to load other scenes or prefabs.

What function in that component actually loads scene? I am not sure that documentation is available?

by user 697872771497328640

You can call switchScene if you have an AssetReference or select with e.g. the index of the scene to load that you assigned in Unity

I am trying to call function from button click, which function should I use?

by user 697872771497328640

You should be able to call select with your asset reference or the index in the sceneSwitcher scenes array

Whatever you prefer

If I have only one scene in list, index is 0, right?

by user 697872771497328640

Yes

Thank you very much!

by user 697872771497328640