- Home /
Question by
akashsunny · Dec 09, 2014 at 07:53 AM ·
randomizeeditor-classes
Custom Editor Scripting Help
I've made two classes one for randomizing the scale and the other is the custom editor public class Randomize {
void random()
{
transform.localScale = new Vector3( Random.Range(2,7) ,1);
}
}
and my editor holds a button that when pressed calls this method from a reference in the editor script ??
and when ever i press the Button it's throwing a null reference exception .. I'm totally stuck .. No idea .. Why the Null reference thing is coming up ..
I've even checked that i'm referencing correctly .. Everthing is fine
Hoping for the reply ASAP :)
Comment