Tag Info

New answers tagged


This type of state information seems perfect for a Controller type of component. In most implementations, you often have a PlayerController and an AIController that are derived from a common controller component. The AI system and Player system use these controllers to transition state of the associated entity. As state transitions (standing to moving ...


I see two solutions to your questions. 1) Use the SendMessage(string methodName) function. It will call the given method on every components of the gameObject. (More info here: http://docs.unity3d.com/ScriptReference/Component.SendMessage.html). Here is an example: public class Script1 : MonoBehavior { public void DestroyShip() { /* ...

Top 50 recent answers are included