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 actual data of the mesh
The hash of the mesh
The index of the joint buffer of all sub meshes in the joint map buffers
The maximum position of all vertices in the mesh
The minimum position of all vertices in the mesh
Returns the url of this asset's native object, if none it will returns an empty string.
The number of reference
The sub meshes for rendering. Mesh could be split into different sub meshes for rendering.
The struct of the mesh
The sub meshes count of the mesh.
Set native file name for this asset.
Add references of asset
itself
Reset the struct and data of the mesh
The new struct
The new data
Read the requested attribute of the given sub mesh and fill into the given buffer.
Sub mesh index
Attribute name
The target array buffer
Byte distance between two attributes in the target buffer
The offset of the first attribute in the target buffer
Return false if failed to access attribute, return true otherwise.
Read the indices data of the given sub mesh and fill into the given array
Sub mesh index
The target output array
Return false if failed to access the indices data, return true otherwise.
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 mesh and release all related GPU resources
Release all related GPU resources
Read the requested attribute of the given sub mesh
Sub mesh index
Attribute name
Return null if not found or can't read, otherwise, will create a large enough typed array to contain all data of the attribute, the array type will match the data type of the attribute.
Read the indices data of the given sub mesh
Sub mesh index
Return null if not found or can't read, otherwise, will create a large enough typed array to contain all indices data, the array type will use the corresponding stride size.
Reset the mesh with mesh creation information
Mesh creation information including struct and data
应 AssetDB 要求提供这个方法。 返回一个序列化后的对象
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.
Validation for whether the given mesh can be merged into the current mesh. To pass the validation, it must satisfy either of these two requirements:
Same mesh layout means:
The other mesh to be validated
应 AssetDB 要求提供这个方法。
Generated using TypeDoc
Mesh asset