I know I’ve asked a lot of questions here lately but I get this error when I try to build my game.
Assets/Scripts/CoinPickup.js(11,13): BCE0005: Unknown identifier: ‘UnityEditor’.
My guess would be since im building the game it no longer compiles scripts through the editor so something like if (UnityGame.TakeInfo)(name) == “Player”;{ instead of UnityEditor perhaps? I’m officially stumped on this one.
Here’s the script it says their a compiler error in.
#pragma strict
//This Script gives the GUI info.
// This script also says if player collideds with coin then coin is destroyed
//Destroy effect prevents particles from being alive forever.
var CoinEffect : Transform;
var coinValue = 0;
function OnTriggerEnter (info : Collider){
if (UnityEditor.TakeInfo)(name) == “Player”;{
GameMaster.currentScore += 1;
var effect = Instantiate(CoinEffect, transform.position, transform.rotation);
Destroy(effect.gameObject, 3);
Destroy(gameObject);
}
}