RenderTexture 渲染纹理
Inherits from Texture
Render textures are textures that can be rendered to.
RenderTexture是可以被渲染的纹理。
They can be used to implement image based rendering effects, dynamic shadows, projectors, reflections or surveillance cameras.
它们可以用来实现基于渲染效果的图像、动态阴影、投影、反射或监视摄像机。
All rendering goes into the active RenderTexture (active class property). If the active RenderTexture is null everything is rendered to the main window.
所有渲染将进入激活的RenderTexture(active类属性)。
Note that while RenderTexture assets can be only power-of-two size, it is possible to create a non-power-of-two (rect) render textures from scripts. These are most often used for image post processing effects.
注意,RenderTexture资源只能是2的幂次方大小,它可以从脚本创建一个不是2的乘方的渲染纹理。这最常用于图像后期处理效果。
RenderTexture class is only available in Unity Pro.
RenderTexture类只能激活于Unity专业版。
Variables变量
-
The width of the render texture in pixels.
渲染纹理的宽度,以像素为单位。 -
The height of the render texture in pixels.
渲染纹理的高度,以像素为单位。 -
The precision of the render texture's depth buffer in bits (0, 16, 24 are supported)
渲染纹理的深度位数(支持0, 16, 24)的精确度。 -
Is the size of the render texture constrained to power of two sizes?
渲染纹理是否包含2的乘方大小? -
The format of the render texture.
渲染纹理的格式。 -
Generate mipmap levels?
生成多级纹理级别? -
If enabled, this Render Texture will be used as a Cubemap
如果启用,这个渲染纹理将使用Cubemap。
Constructors构造器
-
Creates a new RenderTexture object.
创建一个新的渲染纹理对象。
Functions函数
-
Actually creates the RenderTexture.
实际创建RenderTexture。 -
Releases the RenderTexture.
释放RenderTexture。 -
Is the render texture actually created?
渲染纹理是否被实际创建? -
Discards the contents of the RenderTexture.
舍弃渲染纹理的内容。 -
Assigns this RenderTexture as a global shader property named propertyName.
指定这个RenderTexture作为一个名为propertyName的全局shader属性。
Class Variables类变量
-
The active render texture.
激活的渲染纹理。
Class Functions类函数
-
Allocate a temporary render texture.
分配一个临时的渲染纹理。 -
Release a temporary texture allocated with GetTemporary.
释放一个由GetTemporary分配的临时纹理。
Inherited members继承成员
Inherited Variables继承变量
-
Width of the texture in pixels (Read Only)
以像素为单位的贴图宽度 (只读) -
Height of the texture in pixels (Read Only)
以像素为单位的贴图的高度(只读) -
Filtering mode of the texture.
贴图的过滤模式 -
Anisotropic filtering level of the texture.
贴图的各向异性等级。(增加等级意味着更好的贴图效果,但是会需要更大的开销,减小则减少开销,代价是较远处或侧面的贴图会变得模糊。) -
Wrap mode (Repeat or Clamp) of the texture.
循环模式 (重复或强制拉伸?) -
Mip map bias of the texture.
Mip贴图偏移
-
The name of the object. //物体的名字
-
Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
-
Retrieve native ('hardware') handle to a texture
检索本地纹理('硬件')
-
Returns the instance id of the object.
返回物体的实例ID -
Returns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions继承类函数
-
Does the object exist?
物体是否存在? -
Clones the object original and returns the clone.
克隆原始物体,并返回克隆的物体 -
-
Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源 -
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 -
Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 -
Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 -
Compares if two objects refer to the same
比较如果两个物体相同 -
Compares if two objects refer to a different object
比较如果两个物体不同 -
Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。