Hello!
I have a problem (error CS0115: ‘Portal.onCollide(Collider2D)’: no suitable method found to override)
Code down below:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Portal : Collidable
{
public string[ ] sceneNames;
protected override void onCollide(Collider2D coll)
{
if (coll.name == “player_0”)
{
//Teleport
string sceneName = sceneNames[Random.Range(0, sceneNames.Length)];
Application.LoadLevel(“test”);
//SceneManager.LoadScene(sceneName);
}
}
}
7607647–944839–Portal.cs (487 Bytes)