Next: Transform Window, Previous: Mouse Over Toggle, Up: Interaction [Contents][Index]
This component implements a generic selection system for your game. To use add some indicators to the prefab you wish to be selectable like green circles around the feet or arrows above the head. Also determine if you want any functionality to occur when the object is selected for example opening a production menu on unit production structures. Add all of these to the appropriate lists above. Then, send the ’Select’ and ’Deselect’ messages to the object when appropriate using any message sender.
List<GameObject>
selectionEnabledObjectsObjects that will be toggled on when we are selected
Default value: new List<GameObject>()
List<GameObject>
selectionDisabledObjectsObjects that will be toggled off when we are selected
Default value: new List<GameObject>()
List<MonoBehaviour>
selectionEnabledComponentsScripts that will be toggled on when we are selected
Default value: new List<MonoBehaviour>()
List<MonoBehaviour>
SelectionDisabledComponentsScripts that will be toggled off when we are selected
Default value: new List<MonoBehaviour>()
List<MessageManager.ManagedMessage>
messagesA list of messages which can be sent depending on whether or not the object is selected by the player
Default value: new List<MessageManager.ManagedMessage>()
Selects this object, activating/deactivating the appropriate scripts and objects, listed above
Deselects this object, activating/deactivating the appropriate scripts and objects, listed above
Swaps the selection state of this object, activating/deactivating the appropriate scripts and objects, listed above
Sends all ’Messages’, but only if this object is currently selected
List<GameObject>
selectionEnabledObjectsObjects that will be toggled on when we are selected
Default value: new List<GameObject>()
List<GameObject>
selectionDisabledObjectsObjects that will be toggled off when we are selected
Default value: new List<GameObject>()
List<MonoBehaviour>
selectionEnabledComponentsScripts that will be toggled on when we are selected
Default value: new List<MonoBehaviour>()
List<MonoBehaviour>
SelectionDisabledComponentsScripts that will be toggled off when we are selected
Default value: new List<MonoBehaviour>()
List<MessageManager.ManagedMessage>
messagesA list of messages which can be sent depending on whether or not the object is selected by the player
Default value: new List<MessageManager.ManagedMessage>()
Selects this object, activating/deactivating the appropriate scripts and objects, listed above
Deselects this object, activating/deactivating the appropriate scripts and objects, listed above
Swaps the selection state of this object, activating/deactivating the appropriate scripts and objects, listed above
Sends all ’Messages’, but only if this object is currently selected
Next: Transform Window, Previous: Mouse Over Toggle, Up: Interaction [Contents][Index]