|
FAQ
Dec 4, 2018 20:04:06 GMT
Post by echo17 on Dec 4, 2018 20:04:06 GMT
Q: I'm having a problem, what is the best way to get help? A: answerQ:After dragging the Book prefab to the scene I cannot make any changes / the changes do not save. What do I do? A: answerQ: How do I use a canvas and UI elements in a page? A: answerQ: Can I turn the pages manually with a mouse or through code? A: answerQ: How do I change the size of the book? A: answerQ: When I run the scene, some of my materials are messed up or showing pink (magenta). What do I do? A: answerQ: My demos are missing layer names in the gameobject layer and layermask settings in some components. How do I fix this? A: answer
|
|
|
FAQ
Dec 4, 2018 20:04:10 GMT
Post by echo17 on Dec 4, 2018 20:04:10 GMT
Q: I'm having a problem, what is the best way to get help?Now and then you will come across a problem or question that may not be answered in these FAQs. If so, the best way to communicate the issue with me is to create a simple project that shows the problem occurring. Being able to dig into your project and run it against my source code is the quickest way for me to see what is going on. Please include the invoice number you received when you purchased EndlessBook. I will only debug your projects if I can verify that you have purchased the plugin.Note: You do not need to include the invoice attachment that you received, it is sufficient to just provide the invoice number if you prefer. Be sure to keep your project simple. Try to eliminate anything else that is not relevant to the problem so that it is easier to narrow down the issue. Larger projects will take more time to sift through and may introduce other errors not directly related to EndlessBook. If possible, create a project from scratch and build an example that produces the issue you are seeing. Also, be sure to include a list of steps that I can perform to reproduce the issue. Keep in mind that I have never seen your project before and do not know how to interact with it without your guidance. Let me know what you expect to see, since what I observe may appear operational to my uninitiated eye. Note that the more complicated your example project or the less detail you provide in how to demonstrate an issue you are seeing, the lower the priority I will assign to helping you solve your issue. Most of my time is spent helping people with my various products, so to make it fair to everyone I will choose to help those that make it easier first.When you create your project, just zip up the entire project folder. If you send me individual assets, the links between them will be lost and I will have to recreate the project from scratch. This can possibly produce skewed results since I have created a different project from the one you have sent. The best way to determine if your sample project is testable is to open it yourself and try to run it. You can send your project to the email in my signature. I try to respond as quickly as possible (with the exception of weekends, holidays, and vacation time). Note: Please DO NOT post your project on public forums! This is a violation of the Unity Asset Store license agreement since your project will contain dll's which you are not free to distribute.
|
|
|
FAQ
Mar 5, 2020 18:56:00 GMT
Post by echo17 on Mar 5, 2020 18:56:00 GMT
Q: After dragging the Book prefab to the scene I cannot make any changes / the changes do not save. What do I do?
Prior to Unity 2019.3.3, the Book prefab came with an Unpack.cs component that would unpack the prefab for you, allowing changes in the inspector.
Unity 2019.3.3 introduced a bug that caused crashing when trying to programmatically unpack the prefab. Because of this, EndlessBook 1.4.1+ removed the unpack component and you will now have to manually unpack. To do this, drag the Book prefab to the scene, right-click on the prefab and select Unpack Completely.
Please be sure you are using EndlessBook 1.4.1+ if you are on Unity 2019.3.3+.
|
|
|
FAQ
Mar 31, 2020 12:23:34 GMT
Post by echo17 on Mar 31, 2020 12:23:34 GMT
Q: How do I use a canvas and UI elements in a page?EndlessBook uses materials for its pages. You can use RenderTextures in your materials to display other cameras' scenes, giving the illusion that your page is interactive and dynamic. This works well with pretty much all scene objects except for Unity's UI elements. Unity has a limitation that canvases can only be rendered in screen overlay, screen camera, or world. There isn't an option for handling the translation of UI clicks in a RenderTexture. Unfortunately, this means that UI elements inside a canvas within a RenderTexture are not usable like they would be from the other three render modes. This is outside the scope of EndlessBook since it is a core limitation of the Unity editor and runtime code. If you wish RenderTextures to handle Unity UI elements directly, please petition the Unity team to get this feature added. The more petitions they receive, the better the chance that this will be added as a core feature. Fortunately, there are two alternatives that you can use: 1) Create your own UI elements as 3D objects with colliders in a 3D scene and translate the page events to the RenderTexture sceneThis is actually done for you in Demo #2 included with the plugin. Check out the second page of the book which displays the table of contents. You can see in the Page Views/PageView_02 section of the scene that there are a series of colliders set up for each of the chapters of the book. When a user clicks on the RenderTexture of the page, the click is translated to the PageView_02 camera and raycast into the scene to see if any of the elements are being interacted with. The magic of this is done in the PageView.cs code which is the base class of PageView_02.cs You can see the translation and raycast inside the method RayCast. The overloaded method HandleHit processes any collisions that are found by the raycast. Physics.Raycast(pageViewCamera.ViewportPointToRay(hitPointNormalized), out hit, maxRayCastDistance, raycastLayerMask) Here is a video showing the book interaction (65 second mark): 2) Use an UI overlayThis is not as elegant as the above solution since you will need to disable the UI while the pages are turning since the overlay does not follow the mesh of the page like a RenderTexture would. Once the page has stopped turning, you can enable the UI overlay, allowing the user to click elements like they would on the main camera canvas. When the page starts to turn, you will need to disable the overlay canvas so it does not break the illusion that it is on the page.
|
|
|
FAQ
Jul 1, 2021 12:59:47 GMT
Post by echo17 on Jul 1, 2021 12:59:47 GMT
Q: Can I turn the pages manually with a mouse or through code?
Yes, you can. Demo #3 included with the plugin shows an example of how to do this. Here is some pseudocode showing how this is done:
book.TurnPageDragStart(direction); book.TurnPageDrag(normalizedTime); book.TurnPageDragStop(turnStopSpeed, PageTurnCompleted, reverse: reversePageIfNotMidway ? (book.TurnPageDragNormalizedTime < 0.5f) : false);
Here is a video showing this in action:
|
|
|
FAQ
Oct 11, 2021 13:37:27 GMT
Post by echo17 on Oct 11, 2021 13:37:27 GMT
Q: How do I change the size of the book?You can set the scale of the root book element in your scene. Be sure to set the scale of the root element and not just the animated or static stand-ins. This will scale all the book's elements at one time. When you scale the book's geometry, you will also need to inverse scale the textures so that they do not look warped. For instance, if you scaled the book 75% on the x axis, you will see the pages looking squished like: For 75% scale, you will need to invert the scale of the page texture which would be 1 / 75% or 133%. Make sure you only scale the content of the page for the texture, keeping within the bounds of the UV coordinates. This will make the final image look correct in your scaled book
|
|
|
FAQ
Feb 16, 2022 14:11:17 GMT
Post by echo17 on Feb 16, 2022 14:11:17 GMT
Q: When I run the scene, some of my materials are messed up or showing pink (magenta). What do I do?Some versions of Unity have a bug that does not unpack the prefab correctly at runtime. There is a script included with the plugin at Assets/EndlessBook/Book/Scripts/Unpack.cs that will handle this for you. You may need to edit the script to include your version of Unity for it to be recognized by the compiler. If you would like to unpack the prefab manually in the scene, check out this linkUniversal Rendering PipelineImporting EndlessBook into a URP project can also turn the materials magenta. This can be simply fixed by selecting the materials that are used in the book and going to the Unity Editor menu Edit > Rendering > Materials > Convert Selected Built-in Materials to URP. This will update all the shaders used in the materials to be compatible with URP. Some materials won't convert, so you will need to update manually. For example, the Table material in Demo 2 does not convert this way. You will need to go to the table material and select a new shader, something like URP/SimpleLit. You'll then need to select the Base Map material using the Table texture. Other adjustments you may need to make is with lighting intensity. For example, in Demo 2, the candles are set for standard pipeline rendering, so they will be too intense for URP. You can edit the candle intensity by select the candle game objects and editing the inspector properties for min and max intensity. Set these to something lower, like 0.05 and 0.1 for the min/max.
|
|
|
FAQ
Aug 9, 2022 12:36:47 GMT
Post by echo17 on Aug 9, 2022 12:36:47 GMT
Q: My demos are missing layer names in the gameobject layer and layermask settings in some components. How do I fix this?Unity packages lose layer information, so to fix, you'll need to rename your layers. This can be found at Edit > Project Settings > Tags and Layers. You can name your layers anything, but using something simple like "l8" will work fine. Example: This will allow the layer names to show up in gameobjects and layer masks:
|
|