<div class='sourceset sourceset-android'>Android</div>

```kotlin
public class SceneCoreEntitySizeAdapter<T : Entity>(
    public val onLayoutSizeChanged: T.(IntVolumeSize) -> Unit,
    public val intrinsicSize: (T.() -> IntVolumeSize)? = null,
)
```

The sizing strategy used by [SceneCoreEntity](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SceneCoreEntity) to control and read the size of an entity.

The developer should use [onLayoutSizeChanged](#onlayoutsizechanged) to apply compose layout size changes to the
entity. Compose will not inherently affect the size of the `Entity`.

If the developer uses [onLayoutSizeChanged](#onlayoutsizechanged) to change the size of the entity, but [intrinsicSize](/jetpack-compose/androidx.compose.foundation/foundation-layout/classes/IntrinsicSize)
is not provided, then the intrinsic size of the entity will be ignored and the layout size as
determined solely by compose will be used to size the entity. If the [SceneCoreEntity](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SceneCoreEntity) has no
children or size modifiers then compose doesn't know how to size this node and it will be size 0,
causing it not to render at all. In such a case, please do one of the following: (1) provide
[intrinsicSize](/jetpack-compose/androidx.compose.foundation/foundation-layout/classes/IntrinsicSize) so compose can infer the size from the entity, (2) add a sizing modifier to
control the size of the entity, or (3) remove the adapter from the [SceneCoreEntity](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SceneCoreEntity) as without
an adapter compose will not try to control the size of this entity.

Note that many SceneCore entities accept sizes in meter units instead of pixels. The [Meter](/jetpack-compose/androidx.xr.compose/compose/classes/Meter) type
may be used to convert from pixels to meters.

```kotlin
Meter.fromPixel(px, density).toM()
```

#### Parameters

| | |
| --- | --- |
| onLayoutSizeChanged | a callback that is invoked with the final layout size of the composable in pixels. |
| intrinsicSize | a getter method that returns the current [IntVolumeSize](/jetpack-compose/androidx.xr.compose/compose/classes/IntVolumeSize) in pixels of the entity. This isn't as critical for compose as [onLayoutSizeChanged](#onlayoutsizechanged); however, this can help to inform compose of the intrinsic size of the entity. |