Added code support, not great but hey it works
This commit is contained in:
@ -4,13 +4,13 @@
|
||||
</item>
|
||||
|
||||
<item ref="eth" prefab="prefabs/EthPrefab" />
|
||||
<item ref="craig" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
<!-- <item ref="craig" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
<item ref="bg" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
<item ref="square" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
<item ref="square" prefab="prefabs/SimpleSpinningCubePrefab" /> -->
|
||||
|
||||
<item lookAt="0, 0, 5, 0, 0, 0" >
|
||||
<Camera fov="0.436332" ref="cameraNew" />
|
||||
<CameraTexture />
|
||||
<item lookAt="5, 5, 5, 0, 0, 0" >
|
||||
<Camera fov="0.436332" />
|
||||
<CameraTexture ref="camTexture" />
|
||||
</item>
|
||||
|
||||
<item>
|
||||
@ -24,7 +24,16 @@
|
||||
alignUnitRight="UI_COMPONENT_ALIGN_UNIT_PERCENT"
|
||||
alignY="UI_COMPONENT_ALIGN_STRETCH"
|
||||
ref="image"
|
||||
texture="camTexture->renderTarget.getTexture()"
|
||||
/>
|
||||
</item>
|
||||
</item>
|
||||
|
||||
<code type="init">
|
||||
useEvent([&]{
|
||||
assertNotNull(camTexture);
|
||||
assertNotNull(image);
|
||||
camTexture->renderTarget.setSize(image->getWidth(), image->getHeight());
|
||||
}, image->eventAlignmentUpdated);
|
||||
</code>
|
||||
</scene>
|
Reference in New Issue
Block a user