Editor.Assets.FileCompressionSettings
ClassBase type for file-backed compression strategies, assigned to AssetImportMetadata.compressionSettings to set the compression applied at import.
Index
Properties
Methods
Example
// FileCompressionSettings is the base for file-level (mesh/texture) compression.
// Concrete subclasses are DracoCompressionSettings and SizeCompressionSettings;
// assign one of them to fileMeta.compressionSettings.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
const meshSettings = Editor.Assets.DracoCompressionSettings.create(scene);
meshSettings.compressionLevel = 5;
const texSettings = Editor.Assets.SizeCompressionSettings.create(scene);
texSettings.level = Editor.Assets.TextureCompressionLevel.Medium;
console.log(
`FileCompression children: Draco(level=${meshSettings.compressionLevel}), Size(level=${texSettings.level})`,
);
Extends
Extended by
Properties
id
readonlyid:Uuid
The unique id of the entity.
Inherited from
meta
readonlymeta:Meta
Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.
Inherited from
type
readonlytype:string
The entity's type.
Inherited from
Methods
getDirectlyReferencedEntities()
getDirectlyReferencedEntities():
Entity[]
A list of entities which this entity has a reference to.
Returns
Entity[]
Inherited from
AssetCompressionSettings.getDirectlyReferencedEntities
getMeta()
staticgetMeta():Meta
Returns metadata about this type.
Returns
Overrides
AssetCompressionSettings.getMeta
getOwnedEntities()
getOwnedEntities():
Entity[]
A list of entities which has a reference to this entity.
Returns
Entity[]
Inherited from
AssetCompressionSettings.getOwnedEntities
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
AssetCompressionSettings.getTypeName
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
AssetCompressionSettings.getTypeName
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
AssetCompressionSettings.isOfType
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean