Question by
How_not_play_king · May 28, 2016 at 11:32 AM ·
variablesscript errorsystem.type
why is this code not working
This code will load a scene when someone the player collides with a object (being like a following character) i wont to have it so i can use it for multiple times in different situations. i get the error
Assets/loAD.js(6,32): BCE0023: No appropriate version of 'UnityEngine.SceneManagement.SceneManager.LoadScene' for the argument list '(System.Type)' was found.
the code is here!!!
import UnityEngine.SceneManagement;
var loadleval = String;
var trigger = String;
function OnCollisionEnter(){
if (OnCollisionEnter.gameObject.name == trigger);{
SceneManager.LoadScene (loadleval);
}
}
Comment
Your answer
Follow this Question
Related Questions
Changing a variable from another script 1 Answer
Variable changing from other script does not work. 1 Answer
Getting an object's y coordinate 2 Answers
How to change text based on the value of a scrollbar? 1 Answer
Unreferenced label? 0 Answers