Method TrySetTexture
TrySetTexture(TextureInfoBase, Material, IGltfReadable, int, int, int, int)
Attempts assigning a glTF texture to a Unity material.
Declaration
protected bool TrySetTexture(TextureInfoBase textureInfo, Material material, IGltfReadable gltf, int texturePropertyId, int scaleTransformPropertyId = -1, int rotationPropertyId = -1, int uvChannelPropertyId = -1)
Parameters
Type | Name | Description |
---|---|---|
TextureInfoBase | textureInfo | glTF source texture |
Material | material | target material |
IGltfReadable | gltf | Context glTF |
int | texturePropertyId | Target texture property |
int | scaleTransformPropertyId | Scale/transform (_ST) property |
int | rotationPropertyId | Rotation property |
int | uvChannelPropertyId | UV channel selection property |
Returns
Type | Description |
---|---|
bool | True if texture assignment was successful, false otherwise. |