'Is there any way to show in the inspector a scene with the possible zones to spawn the player?
I'm trying to make an intiutive inspector to select a scene and the possibility of select a "zone" as well to the player spawn position in the scene selected.
Recently I got show Scenes in the unity inspector following this tutorial: https://forum.unity.com/threads/how-to-link-scenes-in-the-inspector.383140/
My class currently:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LevelManagement;
public class ChangeScene : MonoBehaviour
{
[Scene] [SerializeField] private string nameScene;
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.CompareTag("Player"))
{
LevelLoader.LoadLevel(nameScene);
}
}
}
Now I want that depends on the scene, the "zones" of this appear automatically to select one.
For example, if I select a scene called "World01", appear the zones of this specific Scene like a Enum or another way.
Use a customeditor to check every scene and show differents enums... is discarded
Is there any way to get that?
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
