when I use Addcomponent< ObjectActor>(); 5.0.0b9 crash.but it’s ok on 4.6.
ObjectActor define is
namespace Render
{
public class ObjectActor : Object
{
public override EntityType getType()
{
return EntityType.ET_ACTOR;
}
...
}
}
is it a bug in 5.0.0b9?
can anyone help me?
Uhm, with that little information you can’t expect any help here. How is Object defined? Have you any code in Awake / OnEnable in your base class or the derived class? Is Object actually derived from MonoBehaviour? Is that ObjectActor class in a file called “ObjectActor.cs”?
I’m pretty sure that AddComponent still works in Unity5
However since it’s not out yet (it’s just an early access beta version for those who preordered Unity5) you probably won’t get much help here anyways.