UxrAnimatedMaterial.AnimateBlinkColor Method

Starts animating a GameObject’s material making one if its color parameters blink.

Namespace: UltimateXR.Animation.Materials
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static UxrAnimatedMaterial AnimateBlinkColor(
	GameObject gameObject,
	string varNameColor,
	Color colorOff,
	Color colorOn,
	float blinkFrequency = 3f,
	float durationSeconds = -1f,
	UxrMaterialMode materialMode = UxrMaterialMode.InstanceOnly,
	Action finishedCallback = null
)

Parameters

 

gameObject
Type: GameObject
GameObject whose material to animate
varNameColor
Type: System.String
The float var name
colorOff
Type: Color
The minimum color value in the blink
colorOn
Type: Color
The maximum color value in the blink
blinkFrequency (Optional)
Type: System.Single
The blinking frequency
durationSeconds (Optional)
Type: System.Single
The duration in seconds. Use a negative value to keep keep blinking until stopping manually.
materialMode (Optional)
Type: UltimateXR.Animation.Materials.UxrMaterialMode
The material mode
finishedCallback (Optional)
Type: System.Action
Optional callback when the animation finished

Return Value

Type: UxrAnimatedMaterial
Material animation component

See Also

Reference

UxrAnimatedMaterial Class
UltimateXR.Animation.Materials Namespace