Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Expansions.Missions.Editor.GAPPrefabDisplay Class Reference

A GAP component to display any GameObject in the window. It will just allow rotation, and will duplicate the GameObject that is passed on Setup. More...

Inheritance diagram for Expansions.Missions.Editor.GAPPrefabDisplay:
Expansions.Missions.Editor.ActionPaneDisplay

Public Member Functions

override void Clean ()
 Clean this GAP Display More...
 
override void Destroy ()
 Destroy this GAP Display More...
 
override void Setup (Camera displayCamera, int layerMask)
 Setup the Action Pane display More...
 
void Setup (GameObject prefabTargetObject, float camDistance)
 Setup the GameObject used in this display More...
 
- Public Member Functions inherited from Expansions.Missions.Editor.ActionPaneDisplay
Button AddToolbarButton (string id, string icon, string toolTip)
 Creates a gap toolbar button control More...
 
Toggle AddToolbarToggle (string id, string icon, string toolTip, bool startState=false)
 Creates a gap toolbar toggle control More...
 
void ClearToolbar ()
 Clean the GAP tool bar controls More...
 
bool GetMousePointOnCamera (Vector2 mousePosition, Camera canvasCamera, ref Vector2 point)
 Gets the mouse position relative to the GAP display camera, used for ray cast objects displayed in the render texture More...
 
Button GetToolbarButton (string id)
 Get a tool bar button More...
 
virtual void OnBeginDrag (PointerEventData eventData)
 Event triggered on drag begin More...
 
override void OnDeselect (BaseEventData eventData)
 Event triggered on UI selectable deselect More...
 
virtual void OnDisplayClickUp (RaycastHit?hit)
 
virtual void OnDisplayDragEnd (RaycastHit?hit)
 
virtual void OnDrag (PointerEventData eventData)
 Event triggered on pointer drag More...
 
virtual void OnEndDrag (PointerEventData eventData)
 Event triggered on drag end More...
 
virtual void OnPointerClick (PointerEventData eventData)
 Event triggered on pointer click this gameobject rect More...
 
override void OnPointerEnter (PointerEventData eventData)
 Event triggered on pointer enter this gameobject rect More...
 
override void OnPointerExit (PointerEventData eventData)
 Event triggered on pointer exit this gameobject rect More...
 
override void OnPointerUp (PointerEventData eventData)
 
override void OnSelect (BaseEventData eventData)
 Event triggered on UI selecteable select More...
 
bool Raycast (Vector3 cameraPoint, out RaycastHit hit, int layerMask=-1)
 Help function, makes a ray cast from the supplied camera point using the gap display camera, layer mask and hit distance values More...
 
void UpdateDisplayArea ()
 Updates the render texture display area maintaining the game aspect ratio More...
 

Protected Member Functions

void LoadTarget (GameObject newTarget)
 Loads a new GameObject in the GAP window. More...
 
override void OnDisplayDrag (PointerEventData.InputButton button, Vector2 delta)
 
override void Update ()
 
- Protected Member Functions inherited from Expansions.Missions.Editor.ActionPaneDisplay
override void Awake ()
 
void ClearToolbarEvents ()
 Clear the tool bar controls events More...
 
virtual void OnDisplayClick (RaycastHit?hit)
 
virtual void OnMouseOver (Vector2 position)
 

Protected Attributes

bool isReady = false
 
GameObject targetObject = null
 
GAPVesselCamera vesselCamera
 
GameObject vesselCameraSetup
 
- Protected Attributes inherited from Expansions.Missions.Editor.ActionPaneDisplay
Camera displayCamera
 
RenderTexture displayTexture
 
float hitDistance
 
bool isDragging = false
 
bool isMouseOver = false
 
bool isSelected = false
 
int layerMask
 
DictionaryValueList< string,
MonoBehaviour > 
toolbarControls
 

Properties

GameObject PrefabInstance [get]
 
- Properties inherited from Expansions.Missions.Editor.ActionPaneDisplay
RenderTexture DisplayTexture [get]
 

Additional Inherited Members

- Public Attributes inherited from Expansions.Missions.Editor.ActionPaneDisplay
RaycastEvent DisplayClick
 Event that triggers on the display click, sends a hitinfo if an object was clicked on More...
 
RaycastEvent DisplayClickUp
 Event that triggers on the display click when the button is up, sends a hitinfo if an object was clicked on More...
 
DragEvent DisplayDrag
 Event that triggers a mouse drag, sends the button and mouse delta information More...
 
RaycastEvent DisplayDragEnd
 Event that triggers on the display click when the button is up, sends a hitinfo if an object was clicked on More...
 
RawImage displayImage
 Raw image that displays the render texture More...
 
MouseOverEvent MouseOver
 Event that trigger when the mouse is over the GAP display image More...
 
RectTransform rectTransform
 Rect transform cache More...
 

Detailed Description

A GAP component to display any GameObject in the window. It will just allow rotation, and will duplicate the GameObject that is passed on Setup.

Member Function Documentation

override void Expansions.Missions.Editor.GAPPrefabDisplay.Clean ( )
inlinevirtual

Clean this GAP Display

Reimplemented from Expansions.Missions.Editor.ActionPaneDisplay.

override void Expansions.Missions.Editor.GAPPrefabDisplay.Destroy ( )
inlinevirtual

Destroy this GAP Display

Reimplemented from Expansions.Missions.Editor.ActionPaneDisplay.

void Expansions.Missions.Editor.GAPPrefabDisplay.LoadTarget ( GameObject  newTarget)
inlineprotected

Loads a new GameObject in the GAP window.

Parameters
newTarget
override void Expansions.Missions.Editor.GAPPrefabDisplay.OnDisplayDrag ( PointerEventData.InputButton  button,
Vector2  delta 
)
inlineprotectedvirtual
override void Expansions.Missions.Editor.GAPPrefabDisplay.Setup ( Camera  displayCamera,
int  layerMask 
)
inlinevirtual

Setup the Action Pane display

Parameters
displayCameraCamera used to display the Action Pane contents
maskLayer mask used for the click raycast

Reimplemented from Expansions.Missions.Editor.ActionPaneDisplay.

void Expansions.Missions.Editor.GAPPrefabDisplay.Setup ( GameObject  prefabTargetObject,
float  camDistance 
)
inline

Setup the GameObject used in this display

Parameters
prefabTargetObjectThe GameObject that will be duplicated in the GAP (MostLikely a Prefab)
override void Expansions.Missions.Editor.GAPPrefabDisplay.Update ( )
inlineprotectedvirtual

Member Data Documentation

bool Expansions.Missions.Editor.GAPPrefabDisplay.isReady = false
protected
GameObject Expansions.Missions.Editor.GAPPrefabDisplay.targetObject = null
protected
GAPVesselCamera Expansions.Missions.Editor.GAPPrefabDisplay.vesselCamera
protected
GameObject Expansions.Missions.Editor.GAPPrefabDisplay.vesselCameraSetup
protected

Property Documentation

GameObject Expansions.Missions.Editor.GAPPrefabDisplay.PrefabInstance
get

The documentation for this class was generated from the following file: