-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bitECS: Fix grabbable pinned media objects
** Problem ** When you drop or paste a media file or url, a MediaLoader entity is created. This entity downloads the media file and creates a media (e.g., video) entity. The MediaLoader entity object then adds the media entity object as its child. The MediaLoader entity does not have a visible object after the loading cube disappears, but the media entity does. Both entities are hover targets, but after the loading cube disappears, the MediaLoader entity can no longer be hovered because it does not have a visible object. Only the media entity can be hovered at this point. The media entity is not a networked entity, but the MediaLoader entity is. This means that the MediaLoader entity can be pinned (the creator is "reticulum"), but the media entity cannot. If you check whether the media entity is pinned, it will always return false. Then media entity will always be grabbable even if it is pinned (more precisely its parent is pinned). **Solution** Check its parent is pinned to check media entity is pinned. **Changes** - Add LoadedByMediaLoader component to detect a media entity is loaded via MediaLoader - Add a special path for media entity loaded via MediaLoader in hold-system that checks its parent is pinned to check whether it is pinned.
- Loading branch information
Showing
3 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters