TrailRenderer 拖痕渲染器

Inherits from Renderer

The trail renderer is used to make trails behind objects in the scene as they move about.

拖痕渲染器用于在场景中创建物体后面的拖动痕迹。

This class is a script interface for a trail renderer component.

这个类是用户拖痕渲染器组件的一个脚本接口。

Variables变量

  • time
    How long does the trail take to fade out.
          拖痕淡出用多长时间。
  • startWidth
    The width of the trail at the spawning point.
          在生成点拖痕的宽度。
  • endWidth
    The width of the trail at the end of the trail.
          拖痕末端的宽度。
  • autodestruct
    Does the GameObject of this trail renderer auto destructs?
          拖痕渲染器的GameObject自动销毁么?

Inherited members继承成员Inherited Variables继承变量

  • isPartOfStaticBatch
    Has this renderer been statically batched with any other renderers?
          这个渲染器有被任何其他渲染器静态批处理?
  • worldToLocalMatrix
    Matrix that transforms a point from world space into local space (Read Only).
          矩阵(Matrix)世界空间坐标的点转换成自身空间坐标的点(只读)。
  • localToWorldMatrix
    Matrix that transforms a point from local space into world space (Read Only).
          矩阵(Matrix)自身空间坐标的点转换成世界空间坐标的点(只读)。
  • enabled
    Makes the rendered 3D object visible if enabled.
          如果启用,使被渲染的物体可见。这是一个物体隐藏显示的开关。
  • castShadows
    Does this object cast shadows?
          这个物体是否投射阴影?
  • receiveShadows
    Does this object receive shadows?
          这个物体是否接收阴影?
  • material
    The material of this object.
          物体的材质。
  • sharedMaterial
    The shared material of this object.
          物体的共享材质。
  • sharedMaterials
    All the shared materials of this object.
          物体的全部共享材质。
  • materials
    All the materials of this object.
          物体的全部材质。
  • bounds
    The bounding volume of the renderer (Read Only).
          渲染器的边界框(只读)。
  • lightmapIndex
    The index of the lightmap applied to this renderer.
          应用到该渲染器的光照贴图的索引。
  • lightmapTilingOffset
    The tiling & offset used for lightmap.
          用于光照贴图的平铺和偏移值。
  • isVisible
    Is this renderer visible in any camera? (Read Only)
          这个渲染器在任何摄像机可见(只读)?
  • transform
    The Transform attached to this GameObject (null if there is none attached).
          Transform附加到GameObject(游戏物体)(如无附加则为空)。
  • rigidbody
    The Rigidbody attached to this GameObject (null if there is none attached).
          Rigidbody附加到GameObject(游戏物体)(如无附加则为空)。
  • camera
    The Camera attached to this GameObject (null if there is none attached).
          Camera附加到GameObject(游戏物体)(如无附加则为空)。
  • light
    The Light attached to this GameObject (null if there is none attached).
          Light附加到GameObject(游戏物体)(如无附加则为空)。
  • animation
    The Animation attached to this GameObject (null if there is none attached).
          Animation附加到GameObject(游戏物体)(如无附加则为空)。
  • constantForce
    The ConstantForce attached to this GameObject (null if there is none attached).
          ConstantForce附加到GameObject(游戏物体)(如无附加则为空)。
  • renderer
    The Renderer attached to this GameObject (null if there is none attached).
          Renderer附加到GameObject(游戏物体)(如无附加则为空)。
  • audio
    The AudioSource attached to this GameObject (null if there is none attached).
          AudioSource附加到GameObject(游戏物体)(如无附加则为空)。
  • guiText
    The GUIText attached to this GameObject (null if there is none attached).
          GUIText附加到GameObject(游戏物体)(如无附加则为空)。
  • networkView
    The NetworkView attached to this GameObject (Read Only). (null if there is none attached)
          NetworkView附加到GameObject(游戏物体)(只读)(如无附加则为空)。
  • guiTexture
    The GUITexture attached to this GameObject (Read Only). (null if there is none attached)
          GUITexture附加到GameObject(游戏物体)(只读)(如无附加则为空)。
  • collider
    The Collider attached to this GameObject (null if there is none attached).
          Collider附加到GameObject(游戏物体)(如无附加则为空)。
  • hingeJoint
    The HingeJoint attached to this GameObject (null if there is none attached).
          HingeJoint附加到GameObject(游戏物体)(如无附加则为空)。
  • particleEmitter
    The ParticleEmitter attached to this GameObject (null if there is none attached).
          ParticleEmitter附加到GameObject(游戏物体)(如无附加则为空)。
  • gameObject
    The game object this component is attached to. A component is always attached to a game object.
          组件附加的游戏物体。一个组件总是被附加到一个游戏物体。
  • tag
    The tag of this game object.
          游戏物体的标签。
  • name
    The name of the object. //物体的名字
  • hideFlags
    Should the object be hidden, saved with the scene or modifiable by the user?
       物体是否被隐藏、保存在场景中或被用户修改?

Inherited Functions继承函数

  • GetComponent
    Returns the component of Type type if the game object has one attached, null if it doesn't.
          如果游戏物体有一个附加,则返回Type类型的组件,如果没有则为null。
  • GetComponent.<T>
  • GetComponent
    Returns the component with name type if the game object has one attached, null if it doesn't.
          如果游戏物体有一个附加,则返回名字类型组件,如果没有则为null。
  • GetComponentInChildren
    Returns the component of Type type in the GameObject or any of its children using depth first search.
    返回Type类型组件,在GameObject或它的任何子物体使用深度优先搜索,仅返回激活的组件。
  • GetComponentInChildren.<T>
  • GetComponentsInChildren
    Returns all components of Type type in the GameObject or any of its children.
          在GameObject或任何它的子物体,返回全部Type类型组件
  • GetComponentsInChildren.<T>
  • GetComponents
    Returns all components of Type type in the GameObject.
          在游戏物体返回全部Type类型组件。
  • GetComponents.<T>
  • CompareTag
    Is this game object tagged tag?
          游戏物体有被标记标签么?
  • SendMessageUpwards
    Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour
          在游戏物体每一个MonoBehaviour和每一个behaviour的祖先上调用名为methodName的方法。
  • SendMessage
    Calls the method named methodName on every MonoBehaviour in this game object.
          在游戏物体每一个MonoBehaviour上调用名为methodName的方法。
  • BroadcastMessage
    Calls the method named methodName on every MonoBehaviour in this game object or any of its children.
          在游戏物体每一个MonoBehaviour和它的全部子物体上调用名为methodName的方法。
  • GetInstanceID
    Returns the instance id of the object.
    返回物体的实例ID
  • ToString
    Returns the name of the game object.
    返回游戏物体的名称。

Messages Sent发送消息

  • OnBecameVisible
    OnBecameVisible is called when the object became visible by any camera.
          当物体由任意摄像机变为可见时,OnBecameVisible被调用
  • OnBecameInvisible
    OnBecameInvisible is called when the object is no longer visible by any camera.
          当物体任意摄像机变不再可见时,OnBecameInvisible被调用

Inherited Class Functions继承类函数

  • Destroy
    Removes a gameobject, component or asset.
       删除一个游戏物体、组件或资源
  • DestroyImmediate
    Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
       立即销毁物体obj,强烈建议使用Destroy代替。
  • DontDestroyOnLoad
    Makes the object target not be destroyed automatically when loading a new scene.
       加载新场景的时候使目标物体不被自动销毁。
  • FindObjectOfType
    Returns the first active loaded object of Type type.
       返回Type类型第一个激活的加载的物体。
  • FindObjectsOfType
    Returns a list of all active loaded objects of Type type.
       返回Type类型的所有激活的加载的物体列表
  • Instantiate
    Clones the object original and returns the clone.
        克隆原始物体,并返回克隆的物体
,