//a method called by the Selection Manager to attempt to select the object associated with this selection entity public virtual void OnSelected() { if (FactionEntity) //if this is a faction entity { FactionEntity.OnMouseClick(); //trigger a mouse click in the faction entity's main component } AudioManager.Play(gameMgr.GetGeneralAudioSource(), Source.GetSelectionAudio(), false); //play the selection audio Source.EnableSelectionPlane(); //enable the selection plane of the source IsSelected = true; CustomEvents.OnEntitySelected(Source); }