Class CinemachineScreenComposerGuides
Use an instance of this class to draw screen composer guides in the game view. This is an internal class, and is not meant to be called outside of Cinemachine.
Namespace: Cinemachine.Editor
Syntax
public class CinemachineScreenComposerGuides
Fields
GetHardGuide
Get the Hard Guide. Client must implement this
Declaration
public CinemachineScreenComposerGuides.RectGetter GetHardGuide
Field Value
Type | Description |
---|---|
CinemachineScreenComposerGuides.RectGetter |
GetSoftGuide
Get the Soft Guide. Client must implement this
Declaration
public CinemachineScreenComposerGuides.RectGetter GetSoftGuide
Field Value
Type | Description |
---|---|
CinemachineScreenComposerGuides.RectGetter |
kGuideBarWidthPx
Width of the draggable guide bar in the game view
Declaration
public const float kGuideBarWidthPx = 3F
Field Value
Type | Description |
---|---|
Single |
sDraggableGameWindowGuides
If true, then allows game window guides to be edited in play mode.
Declaration
public static bool sDraggableGameWindowGuides
Field Value
Type | Description |
---|---|
Boolean |
SetHardGuide
Set the Hard Guide. Client must implement this
Declaration
public CinemachineScreenComposerGuides.RectSetter SetHardGuide
Field Value
Type | Description |
---|---|
CinemachineScreenComposerGuides.RectSetter |
SetSoftGuide
Get the Soft Guide. Client must implement this
Declaration
public CinemachineScreenComposerGuides.RectSetter SetSoftGuide
Field Value
Type | Description |
---|---|
CinemachineScreenComposerGuides.RectSetter |
Target
Get the target object whose guides are being drawn. Client must implement this
Declaration
public CinemachineScreenComposerGuides.ObjectGetter Target
Field Value
Type | Description |
---|---|
CinemachineScreenComposerGuides.ObjectGetter |
Methods
OnGUI_DrawGuides(Boolean, Camera, LensSettings, Boolean)
Call this from the inspector's OnGUI. Draws the guides and manages dragging.
Declaration
public void OnGUI_DrawGuides(bool isLive, Camera outputCamera, LensSettings lens, bool showHardGuides)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isLive | Is the target live |
Camera | outputCamera | Destination camera |
LensSettings | lens | Current lens settings |
Boolean | showHardGuides | True if hard guides should be shown |
SetNewBounds(Rect, Rect, Rect, Rect)
Helper to set the appropriate new rects in the target object, is something changed.
Declaration
public void SetNewBounds(Rect oldHard, Rect oldSoft, Rect newHard, Rect newSoft)
Parameters
Type | Name | Description |
---|---|---|
Rect | oldHard | Current hard guide |
Rect | oldSoft | Current soft guide |
Rect | newHard | New hard guide |
Rect | newSoft | New soft guide |