UxrAnimatedMaterial.AnimateNoise Method

Starts a material parameter animation using noise

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

Syntax

C#

public static void AnimateNoise(
	GameObject gameObject,
	int materialSlot,
	UxrMaterialMode materialMode,
	UxrMaterialParameterType parameterType,
	string parameterName,
	float noiseTimeStart,
	float noiseTimeDuration,
	Vector4 noiseValueStart,
	Vector4 noiseValueEnd,
	Vector4 noiseValueMin,
	Vector4 noiseValueMax,
	Vector4 noiseValueFrequency,
	bool useUnscaledTime = false,
	Action finishedCallback = null
)

Parameters

 

gameObject
Type: GameObject
The GameObject with the material to apply the animation to
materialSlot
Type: System.Int32
The renderer material slot where the material is
materialMode
Type: UltimateXR.Animation.Materials.UxrMaterialMode
The material mode. Use instance to animate the material of a single object, use shared to also affect all other objects that share the same material
parameterType
Type: UltimateXR.Animation.Materials.UxrMaterialParameterType
Selects the type of the parameter to animate
parameterName
Type: System.String
Selects the name of the parameter to animate. This name is the name in the shader, not in the inspector!
noiseTimeStart
Type: System.Single
The time in seconds the noise will start (Time.time or Time.unscaledTime value)
noiseTimeDuration
Type: System.Single
The duration in seconds of the noise animation
noiseValueStart
Type: Vector4
The start value. For int/float values use .x, for Vector2 use x and y. For Vector3 use x, y, z. etc.
noiseValueEnd
Type: Vector4
The end value. For int/float values use .x, for Vector2 use x and y. For Vector3 use x, y, z. etc.
noiseValueMin
Type: Vector4
The minimum intensity value for the noise. For int/float values use .x, for Vector2 use x and y. For Vector3 use x, y, z. etc.
noiseValueMax
Type: Vector4
The maximum intensity value for the noise. For int/float values use .x, for Vector2 use x and y. For Vector3 use x, y, z. etc.
noiseValueFrequency
Type: Vector4
The noise frequency. For int/float values use .x, for Vector2 use x and y. For Vector3 use x, y, z. etc.
useUnscaledTime (Optional)
Type: System.Boolean
If true it will use Time.unscaledTime, if false it will use Time.time
finishedCallback (Optional)
Type: System.Action
Optional callback when the animation finished

See Also

Reference

UxrAnimatedMaterial Class
UltimateXR.Animation.Materials Namespace