Serializable url for native asset. For internal usage.
Whether the asset is loaded or not
Indicates whether its dependent native assets can support deferred load if the owner scene (or prefab) is marked as asyncLoadAssets
.
Indicates whether its native object should be preloaded from native url.
The underlying native asset of this asset if one is available.
This property can be used to access additional details or functionality releated to the asset.
This property will be initialized by the loader if _native
is available.
The underlying native asset of this asset if one is available.
This property can be used to access additional details or functionality releated to the asset.
This property will be initialized by the loader if _native
is available.
The current EffectAsset.
Name of the current EffectAsset.
The hash value of this material.
Returns the url of this asset's native object, if none it will returns an empty string.
The owner render component
The parent material
The passes defined in this material.
The number of reference
The current technique index.
Set native file name for this asset.
Add references of asset
itself
Copy the target material.
The material to be copied.
Create a new node using this asset in the scene.
If this type of asset dont have its corresponding node type, this method should be null.
Reduce references of asset and it will be auto released when refCount equals 0.
itself
Destroy the material definitively.
Cannot re-initialize after destroy.
For re-initialize purposes, call Material.initialize directly.
Get the specified uniform value for this material.
Note that only uniforms set through Material.setProperty can be acquired here.
For the complete rendering data, use Pass.getUniform instead.
The property or uniform name.
The target pass index. If not specified, return the first found value in all passes.
Initialize this material with the given information.
Material description info.
Callback function after material is loaded in [[Loader]]. Initialize the resources automatically.
Override the passes with the specified pipeline states. Allowed only on material instances.
The pipeline state override values.
The pass to apply to. Will apply to all passes if not specified.
Recompile the shader with the specified macro overrides. Allowed only on material instances.
The shader macro override values.
The pass to apply to. Will apply to all passes if not specified.
Reset all the uniforms to the default value specified in EffectAsset.
Will the rendering data be cleared too?
应 AssetDB 要求提供这个方法。 返回一个序列化后的对象
Convenient property setter provided for quick material setup.
Pass.setUniform should be used instead if you need to do per-frame uniform update.
The target uniform name.
The target value.
The pass to apply to. Will apply to all passes if not specified.
Returns the string representation of the object.
The Asset
object overrides the toString()
method of the Object
object.
JavaScript calls the toString() method automatically
when an asset is to be represented as a text value or when a texture is referred to in a string concatenation.
For assets of the native type, it will return this.nativeUrl
.
Otherwise, an empty string is returned.
This method may be overwritten by subclasses.
应 AssetDB 要求提供这个方法。
Get hash for a material
Generated using TypeDoc
The material asset, specifies in details how a model is drawn on screen.