Components
Components encapsulate functionality that can be added to or removed from entities. For example, a component can enable an entity to play sound, render a 3D model, or execute scripts.
You can add components to entities using the OasisW editor or the engine API. The properties that a component exposes are listed in the inspector when the entity is selected.
Component Types
The OasisW engine has various components defined:
| Component | Description |
|---|---|
| Anim | Specifies state graphs and animations that can be executed in the entity hierarchy. |
| Audio Listener | Specifies the position of the listener for 3D audio playback. |
| Button | Creates user interface buttons. |
| Camera | Renders the scene from the location of the entity. |
| Collision | Assigns a collision volume to the entity. |
| Element | Defines user interface text or image elements. |
| Layout Child | Overrides default layout group properties for a single element. |
| Layout Group | Automatically sets the position and scale of child user interface elements. |
| Light | Attaches a dynamic light source to the entity. |
| Particle System | Attaches a particle system to the entity. |
| Rigid Body | Adds the entity to the scene's physics simulation. |
| Render | Renders graphics primitives or render assets. |
| Screen | Defines the area and rendering of the user interface. |
| Script | Allows the entity to run JavaScript fragments to implement custom behavior. |
| Scrollbar | Defines a scrolling control for a Scrollview component. |
| Scroll View | Defines a scrollable area in a user interface. |
| Sound | Plays audio assets. |
| Sprite | Renders 2D graphics at the location of the entity. |
Deprecated Components
OasisW still provides some deprecated components. These components should not be used in new projects.
| Component | Description |
|---|---|
| Animation | Specifies animations that can be executed on the model specified by the entity's model component. |
| Model | Renders a 3D model at the location of the entity. |