Hey everyone.
Unity3D is crashing on me, and I’m not sure why. My situation is as follows:
I have an external CSharp lib compiled with Visual Studio to .NET 2.0, that’s called from a script
My class looks like this:
public class CircularInfluencer
{
public UnityEngine.Transform transform
{
get { return transform; }
set { transform = value; }
}
public float Radius
{
get { return Radius; }
set { Radius = value; }
}
public float innerInfluence
{
get { return innerInfluence; }
set { innerInfluence = value; }
}
public float outerInfluence
{
get { return outerInfluence; }
set { outerInfluence = value; }
}
}
My script looks like this:
using UnityEngine;
using System.Collections;
using zombielib;
public class InfluencerBehaviour : MonoBehaviour
{
public float radius = 5.0f;
public float innerInfluence = -1.0f;
public float outerInfluence = 0.0f;
private CircularInfluencer influencer;
// Use this for initialization
void Start()
{
influencer = new CircularInfluencer();
influencer.Radius = radius;
}
// Update is called once per frame
void Update()
{
}
}
When I remove the line " influencer.Radius = radius; ", everything works fine. I’m continually rebuilding the lib, but reimporting it on the asset panel doesn’t help. There’s no error or warning from the script compiler, the whole unity program crashes when I try to run it.
Does anyone have an idea of what’s going wrong, or how I can diagnose this?