- Home /
5.0.0b9 Addcomponent cause a crash
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?
Answer by Bunny83 · Nov 03, 2014 at 05:19 AM
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.
thinks to you answer "Have you any code in Awake/OnEnable in you base class" :) the crash is not cause by AddComponent. crash reason is I use 4.6's assetBundle in editor of 5.0b9. think you very much.