Version: 2021.3

VisualEffect

class in UnityEngine.VFX

/

继承自:Behaviour

切换到手册

描述

在场景中引用 VisualEffectAsset 实例的视觉效果类。

变量

aliveParticleCount返回视觉效果中所有存活粒子的总和。
culled使用此属性可确定视觉效果是否在任何摄像机中都不可见。(只读)
initialEventID默认事件名称 ID。要获取此值,请在 VisualEffect 唤醒后或调用 VisualEffect.Reinit 后使用 Shader.PropertyID。
initialEventName默认事件名称。当 VisualEffect 唤醒或调用 VisualEffect.Reinit 时,Unity 会调用此事件。
outputEventReceivedOutput event are reported trough this callback.
pause使用此属性可设置视觉效果的暂停状态。
playRate一个乘数,Unity 在更新 VisualEffect 时将其应用于增量时间。默认值为 1.0f。
resetSeedOnPlay此属性控制每次调用 VisualEffect.Play 函数时视觉效果是否为随机数生成器生成新的种子。
startSeed用于内部随机数生成器的初始种子。
visualEffectAssetVisualEffect 使用的 VisualEffectAsset。

构造函数

VisualEffectVisualEffect 构造函数。

公共函数

AdvanceOneFrame如果 VisualEffect.pause 为 true,则该方法使用当前增量时间处理恰好一帧的下一个视觉效果更新。
CreateVFXEventAttribute使用此方法创建新的 VFXEventAttribute。
GetAnimationCurveGets the value of a named Animation Curve property.
GetBoolGets the value of a named bool property.
GetFloatGets the value of a named float property.
GetGradientGets the value of a named Gradient property.
GetInt获取指定的公开整数。
GetMatrix4x4Gets the value of a named Matrix4x4 property.
GetMeshGets the value of a named Mesh property.
GetOutputEventNamesGets the name of every output event system.
GetParticleSystemInfoGets information on a particle system.
GetParticleSystemNamesGets the name of every particle system.
GetSkinnedMeshRendererGets the value of a named Skinned Mesh Renderer property.
GetSpawnSystemInfoGets state on a spawn system.
GetSpawnSystemNamesGets the name of every spawn system.
GetSystemNamesGets the name of every system.
GetTextureGets the value of a named texture property.
GetTextureDimension获取指定的公开纹理的预期纹理尺寸。
GetUIntGets the value of a named unsigned integer property.
GetVector2Gets the value of a named Vector2 property.
GetVector3Gets the value of a named Vector3 property.
GetVector4Gets the value of a named Vector4 or Color property.
HasAnimationCurveChecks if the Visual Effect can override an Animation Curve with the name you pass in.
HasAnySystemAwakeChecks if any particle system in the effect is awake.
HasBoolChecks if the Visual Effect can override a bool with the name you pass in.
HasFloatChecks if the Visual Effect can override a float with the name you pass in.
HasGradientChecks if the Visual Effect can override a Gradient with the name you pass in.
HasGraphicsBufferChecks if the Visual Effect can override a GraphicsBuffer with the name you pass in.
HasIntChecks if the Visual Effect can override an integer with the name you pass in.
HasMatrix4x4Checks if the Visual Effect can override a Matrix4x4 with the name you pass in.
HasMeshChecks if the Visual Effect can override a Mesh with the name you pass in.
HasSkinnedMeshRendererChecks if the Visual Effect can override a Skinned Mesh Renderer with the name you pass in.
HasSystemUse this function to determine if the VisualEffect has the system you pass in.
HasTextureChecks if the Visual Effect can override a texture with the name you pass in.
HasUIntChecks if the Visual Effect can override an unsigned integer with the name you pass in.
HasVector2Checks if the Visual Effect can override a Vector2 with the name you pass in.
HasVector3Checks if the Visual Effect can override a Vector3 with the name you pass in.
HasVector4Checks if the Visual Effect can override a Vector4 or Color with the name you pass in.
Play使用此方法将播放事件发送到每个生成系统。
Reinit重新初始化视觉效果。
ResetOverride使用此方法将覆盖状态设置为 false。这将还原视觉效果资源指定的默认值。
SendEvent使用此方法发送指定的自定义事件。
SetAnimationCurveSets the value of a named Animation Curve property.
SetBoolSets the value of a named bool property.
SetFloatSets the value of a named float property.
SetGradientSets the value of a named Gradient property.
SetGraphicsBufferSets the value of a named GraphicsBuffer property.
SetIntSets the value of a named integer property.
SetMatrix4x4Sets the value of a named Matrix4x4 property.
SetMeshSets the value of a named Mesh property.
SetSkinnedMeshRendererSets the value of a named Skinned Mesh Renderer property.
SetTextureSets the value of a named texture property.
SetUIntSets the value of a named unsigned integer property.
SetVector2Sets the value of a named Vector2 property.
SetVector3Sets the value of a named Vector3 property.
SetVector4Sets the value of a named Vector4 or Color property.
Simulate使用此方法可快进视觉效果,其原理是使用指定的增量时间对所有系统进行若干步数的模拟。
Stop使用此方法可将停止事件发送到所有生成系统。

继承的成员

变量

enabled启用的 Behaviour 可更新,禁用的 Behaviour 不可更新。
isActiveAndEnabledReports whether a GameObject and its associated Behaviour is active and enabled.
gameObject此组件附加到的游戏对象。始终将组件附加到游戏对象。
tag此游戏对象的标签。
transform附加到此 GameObject 的 Transform。
hideFlags该对象应该隐藏、随场景一起保存还是由用户修改?
name对象的名称。

公共函数

BroadcastMessage调用此游戏对象或其任何子项中的每个 MonoBehaviour 上名为 methodName 的方法。
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentReturns the component of type if the GameObject has one attached.
GetComponentInChildrenReturns the Component of type in the GameObject or any of its children using depth first search.
GetComponentInParentReturns the Component of type in the GameObject or any of its parents.
GetComponents返回 GameObject 中类型为 type 的所有组件。
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children using depth first search. Works recursively.
GetComponentsInParent返回 GameObject 或其任何父项中类型为 type 的所有组件。
SendMessage调用此游戏对象中的每个 MonoBehaviour 上名为 methodName 的方法。
SendMessageUpwards调用此游戏对象中的每个 MonoBehaviour 上或此行为的每个父级上名为 methodName 的方法。
TryGetComponent获取指定类型的组件(如果存在)。
GetInstanceIDGets the instance ID of the object.
ToString返回对象的名称。

静态函数

Destroy移除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoad在加载新的 Scene 时,请勿销毁 Object。
FindObjectOfType返回第一个类型为 type 的已加载的激活对象。
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiate克隆 original 对象并返回克隆对象。

运算符

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。