more EngineLib work
Implemented several improvements to the scripting and entity systems.
changes
prefab caching
- Added caching for prefabs to improve performance when repeatedly instantiating entities
Entity Access in Scripts
- Added
GetEntity, which returns the entity Object that the script is attached to. - Added support for the
thiskeyword in ObSL scripts.
thisis a wrapper aroundGetEntity()to provide direct access to the current entity
custom components
Added support for script-defined components:
entity.AddCustomComponententity.GetCustomComponent
This allows scripts to attach and retrieve custom data/components without requiring engine side component definitions
entity validation
Updated all entity object calls (such as GetComponent) to validate the entity before executing
(in both native bindings & engine source code)
Entity operations now check:
registry.isValid(id)
before accessing the entity.
This prevents errors caused by accessing deleted entities during scenarios such as scene unloading/loading cleanup
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.