Tile - YPreviewObject - Create Preview Object – Ylands
Jump to navigation
Jump to search
Create Preview Object(Entity type, Position, Rotation)
static create(entityType: YEntityType, position: YVector3, rotation: YVector3): YPreviewObject;
Parameters
entityType
position
rotation
Returns
YPreviewObject
Availability
Description
Creates a preview object from an entity type prototype, on target position with chosen rotation.
Notes
- Preview objects are temporary, more optimized versions of entities or logic objects.
- On Tool confirm, all preview objects created via this tile get replaced by entities with identical properties
- If not spawned via the script or automatically on Tool confirm, these objects are deleted on Tool script end.
Create Preview Object(Logic type, Visual, Position, Rotation)
static create(logicType: YGameLogicType, visual: YPreviewObjectVisual, position: YVector3, rotation: YVector3): YPreviewObject;
Parameters
logicType
visual
position
rotation
Returns
YPreviewObject
Availability
Description
Creates a preview object from an game logic type prototype, on target position with chosen rotation.
Notes
- Preview objects are temporary, more optimized versions of entities or logic objects.
- On Tool confirm, all preview objects created via this tile get replaced by game logic objects with identical properties
- If not spawned via the script or automatically on Tool confirm, these objects are deleted on Tool script end.