16 lines
379 B
C#
16 lines
379 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SceneCollider : MonoBehaviour
|
|
{
|
|
void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.name.StartsWith("SceneCollider"))
|
|
{
|
|
int newIndex = int.Parse(other.name.Substring(13));
|
|
|
|
SceneLoader.Instance.LoadSceneData(newIndex, null);
|
|
}
|
|
}
|
|
} |