MovieClipOverlayCameraBehaviour


Description

The MovieClipOverlayCameraBehaviour allows rendering DisplayObjects to the screen.

DisplayObjects can be attached to the stage and will appear overlayed in the scene. For rendering with non-othrographic camera its advisable to create a second camera with the MovieClipOverlayCameraBehaviour attached.


Functions

Awake

Initialises overlays and instances the mesh renderer.

Update

Frame update handler, renders the scene and handles user input etc.

OnPostRender

Doesnt the actual screen mesh generation for rendering.

forceStageScreenSize

updateCalcDrawOffsets

updateCalcDrawOffsets

setProjectionValues

Set drawing scale and offset.

renderFrame

Renders one frame of the active movieclip and advances the timeline.

handleUserInput

handleMouseInputState

setFps

Set framerate ( use this instead of fps property )


Variables

migrationStageSizeUsePixelRect

Stage.stageWidth & Stage.stageHeight will be updated with camera.pixel s

overlayCameraName

Default camera to use for MovieClipOverlayCameraBehaviour.instance

defaultUseAccurateTiming

Enabled depreciated non-time drift frame timing.

g_FrameCounter

enableKeyboard

Set keyboard input enabled

enableMouse

Set to allow mouse or keyboard interaction.

enableTouch

Set to allow touch input.

enableMouseOver

Set mouse over interactions.

multitouch

Enable multiple touch events otherwise the first touch down event will only be used.

fps

Target framerate to render the MovieClip timeline.

colorTransform

Stage color transform.

player

Active MovieClip player instance.

stage

Active Stage instance.

gfxGenerator

Active mesh generator.

stageScale

Stage scale.

syncStageScalePerFrame

Sync MovieClipOverlayCameraBehaviour.stageScale to the scale.scaleX/y per frame.

processInputOnUpdate

Process user input every Update, false will process every swf frame.

swf

Set the swf asset name eg.

symbolName

Set the exported symbol name to load from the swf asset file.

gotoAndStopLabel

Set the current frame to the specified label ( editor only update ).

gotoAndStopFrame

Set the current frame to the specified frame ( editor only update ).

loop

Loop timeline.

movieClip

Active MovieClip player instance.

useFastRenderer

Faster renderer, some features may be disabled if enabled.

useSmoothTime

Use Time.smoothDelta for frame timings.

useAccurateTiming

Use Time.smoothDelta for frame timings, valid if useSmoothTime is used.

doubleBufferMesh

Draw mesh into scene OnPostRender ( default true ).

lastObjectUnderMouse

// Touch input processing

instance

Singleton instance access.

currentFrame

Get or set the current frame on the active MovieClip's timeline.

screenPixelRect

Screen camera Pixel rect.