Remove elements at runtime¶
If you have the VastPark Player installed, click download the example IMML file below and open the demo in the VastPark Player.
Overview¶
Shows how to remove elements from the scene during runtime. Useful to optimize performance.
Instructions¶
Click the box to remove it.

Walkthrough¶
This is a straightforward example.
1 <Script Name="RemoveElement">
2 function main(obj, args)
3 scene:remove(obj)
4 end
5 </Script>
The script above calls the scene's remove function for the object, in this case it is the object which has the trigger attached to it. This removes the element from the scene.