# AssetsSchema

Class · category: Other

Source: https://github.com/playcanvas/editor-api/blob/4303c34bcee9a418297350899ad3a3f555526ec4/src/schema/assets.ts#L7

Provides methods to access the Assets schema

## Constructors

### constructor

```ts
new AssetsSchema(schema: Schema)
```

**Parameters**

- `schema` ([`Schema`](https://api.playcanvas.com/editor/classes/Schema.md)): The schema API

## Methods

### getDefaultData

```ts
getDefaultData(type: string): Record<string, any>
```

Gets default data for asset type

**Parameters**

- `type` (`string`): The asset type

**Returns** `Record<string, any>`: The default data

### getFieldsOfType

```ts
getFieldsOfType(assetType: string, type: string): string[]
```

Gets a list of fields of a particular type for an asset type

**Parameters**

- `assetType` (`string`): The type of the asset.
- `type` (`string`): The desired type

**Returns** `string[]`: A list of fields

**Example**

```javascript
const materialAssetPaths = editor.schema.assets.getFieldsOfType('material', 'asset');
```
