IScoreFlash PushWorld Method (, , Object, , )ScoreFlash API Documentation V4.6.0
Pushes a message to the screen, at worldPosition, with a screen offset of screenOffset.

Namespace: NarayanaGames.ScoreFlashComponent
Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
Syntax

ScoreMessage PushWorld(
	Vector3 worldPosition,
	Vector2 screenOffset,
	Object message,
	GUIStyle style,
	GUIStyle styleHighDensity
)

Parameters

worldPosition
Type: Vector3
where should the message have its reference point on the screen?
screenOffset
Type: Vector2
offset in screen coordinates (e.g. to place the message above an object)
message
Type: OnlineSystem Object
The message to be animated by ScoreFlash. This can be a string, a fully configured custom renderer, an int, long, float, double or any object with a useful ToString() method
style
Type: GUIStyle
a custom style, or null to use the custom style ScoreFlash of skin (this parameter is optional!) If you have a specific color assigned to that style that you want to be used, you need to have "Colors / Color Selection Mode" set to UseColorFromSkin (see colorSelectionMode, ScoreFlash ColorControl).
styleHighDensity
Type: GUIStyle
a custom style, or null to use the custom style ScoreFlash of skinHighDensity (this parameter is optional!)

Return Value

the ScoreMessage representing this text
Remarks

Aside of using worldPosition and screenOffset instead of the layout settings of the ScoreFlash instance this is called on, this does the same as PushLocal(Object, GUIStyle, GUIStyle, Int32).

IMPORTANT: This only works when Camera.main returns the correct camera! If you need to wire up specific cameras, use PushWorld(ScoreFlashFollow3D, Object, GUIStyle, GUIStyle) instead; you can use the property keepStatic to disable following the messages.

See ScoreFlash for several usage examples and links to tutorial videos.
See Also