|
Does Unity API provide a simple solution that will allow me to only allow a single script of a certain type on a Gameobject in the editor like most of the built in components?
(comments are locked)
|
|
Well, not really. The best you can do is to use the Reset() event to detect duplicates. But be careful, you can't destroy the instance in Reset(). I didn't think so. I was going to write my own helper function but probably would have run into problems if you hadn't pointed towards that question. Thanks
Jul 23 '11 at 11:42 PM
Blankzz
(comments are locked)
|
