Skip to content

Instantly share code, notes, and snippets.

View mkrdei's full-sized avatar

Muhammet İkbal Karadayı mkrdei

View GitHub Profile
@yagero
yagero / DoesSceneExist.cs
Created September 26, 2017 12:21
Unity: How to know if a Scene exists and can be loaded?
using UnityEngine.SceneManagement;
public static class UtilsScene
{
/// <summary>
/// Returns true if the scene 'name' exists and is in your Build settings, false otherwise
/// </summary>
public static bool DoesSceneExist(string name)
{
if (string.IsNullOrEmpty(name))