A Controller is responsible for controlling and visualizing a Model. It will get destroyed automatically on the deletion of its Model.

Static Methods

Instantiate Adds the given Controller type as a component to a newly instantiated GameObject.

Protected Fields

model The Model assigned to the Controller. A Controller will be destroyed automatically on the deletion of this Model.

Protected Methods

OnInitialize Called on creation after the Model has been set. Override to use.
OnModelChanged Called when the Model‘s NotifyChange method has been called. Override to use.
OnDestroy Called when the GameObject is destroyed. Make sure to call this in overriding methods.