Use code tags!
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor.SceneManagement;
public class LevelSwitch : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void OnCollisionEnter (Collision col) {
if (col.gameObject.CompareTag("Portal")) {
SceneManagement.SceneManager.LoadScene ("sceneName");
}
}
}
Also, ask your question in the body of your post. Don’t just post a random piece of code with no context and expect your title to take care of everything.
And lastly… sure, that’ll load scene “sceneName” when a collision occurs. If that’s what you expect to happen, that it should do that. Not sure why you need us to tell you that…