Here is the offending code:
class A {
var b : B;
}
class B {
var a : A;
}
function Start () {
var a : A = new A();
var b : B = new B();
a.b = b;
b.a = a;
}
I’m trying to make a bridge building game. The player would draw the beams and joints from an editor screen and the script would store those beams and joints. I would have a joint class and a beam class, the vertices of each beam would reference the joint they connect to. Each joint would have an array of connected beams. Is there any way I can work around this problem? It appears to be a problem with mono, is it possible to replace the version of mono used by Unity?
Thanks in advance
EDIT:
It has nothing to do with the variable names all being the same by the way, I changed them and it doesn’t help.