Add Add Button UI to a turning page book (1 UI for page)
I have a prefab for a book that flips its pages. I want to have each page have a button that loads a different scene. The name of the Prefab is "Book-Page Curl" found in the FREE Assets store in Unity, but for what I can see, each page is a Sprite and does not show in the Preview panel. Can I add a Button UI to each page of this book? Thank you for your time.
if your book pages are one RectTransform each in a canvas you just need to child one button each.
Answer by PPenar · Mar 22, 2017 at 09:02 PM
From what I see this asset works by switching the images of the objects, but the objects remain the same. Try adding a button as a child of one of those objects: and observe the results. Later, you can set duplicates of the same button ( calling the same function) as children of each of those objects and just switch them on/off by subscribing to OnFlip event in Book.cs
Thanks for the reply. I did add the button as child and it gets me closer to where I want to be, However, can you elaborate on "subscribing to OnFlip Event? Because right now, all the buttons "move" with every page turned. I hope this makes sense. Thank you.
Try to add 1 button to each of the objects that I showed you on the screenshot. The OnFleep event is called when page is turned - see the Unity $$anonymous$$anual about UnityEvent