|
Post by mythran on Feb 25, 2024 18:34:29 GMT
Hello, i want to create a book with slots that are dragged to a ui slot. Is it possible to be done? If so can you please tell me the main guidelines to accomplish this task?
Thank you.
|
|
|
Post by echo17 on Feb 26, 2024 9:14:08 GMT
EndlessBook is designed as a 3D mesh with materials for pages. It doesn't integrate with UI directly. There are a couple of options, but they would require some scene setup and scripting to make funtional:
1) UI Overlay
In this option, you could have your UI hover above the book pages. You would need to hide / disable it when turning pages or opening and closing the book since it won't move with the page animations. This is the simplest option, but it lacks the ability to warp the UI to the page.
2) UI inside a subscene
In this option you would create another camera pointing at your UI elements that renders to a render texture. You can then use that render texture in your page materials. Interacting with the UI would be accomplished by trapping mouse events on a collider hovering above the pages. You'd then need to cast these rays into your subscene that has the UI to determine what needs to be done. This is rather involved and I have some examples of this in my Demo #2. They are simple clicking events that allow the pages to be interacted with (like a table of contents or dragging a map around), but nothing as complex as drag and drop. That is outside the scope of this plugin, but you might be able to find other people that have done drag-drop inside a render texture cast from another scene camera.
|
|
|
Post by mythran on Feb 26, 2024 12:45:59 GMT
Thank you very much for the provided possible solutions.
|
|