{"id":5881,"date":"2014-10-24T11:35:52","date_gmt":"2014-10-24T11:35:52","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=5881"},"modified":"2014-11-15T11:07:23","modified_gmt":"2014-11-15T11:07:23","slug":"adding-mesh-content","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=5881","title":{"rendered":"Adding Mesh Content"},"content":{"rendered":"<p>When adding content to your pages sometimes textures alone is just not enough so a system was added to MegaBook that allows you to add any mesh based objects to your book pages, you can have as many different objects per page as you like and they can all have multiple materials, the system will merge all the data into the page mesh so it will animate and turn nicely.<\/p>\n<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpage.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpage-1024x499.jpg\" alt=\"complexpage\" width=\"640\" height=\"311\" class=\"aligncenter size-large wp-image-5882 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpage-1024x499.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpage-300x146.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpage-680x331.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpage.jpg 1856w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nTo add mesh data to your book you just need to layout the meshes you want using any objects you like as long as they expose a mesh, so you can&#8217;t for example use a normal Unity Text object but you could use say Text Mesh Pro. If you have multiple objects per page then you will need to make all the objects a child of one object so that the system will now to add the parent and any children. In the image above you can see 4 pages worth of content have been created, each one using multiple objects. The hierarchy on the right shows the actual objects have been grouped under a page object named to show which page it will be in the book. If your meshes make use of vertex colors at all then make sure you have the &#8216;Allow Color&#8217; option checked in the MegaBook params.<\/p>\n<p>When you have your content prepared make an empty game object and add the MBComplexPage script to it, you will now see an Add Page button, click this for how ever many pages of content you want to add to the book. In this case we have 4 pages so the button will be clicked 4 times. Now for each page you can select the object that will be added so here we pick the four parent objects of the content we created. Once that has been done you just need to select your book and click the Rebuild button, you should now see the mesh data has been added to your book for you.<\/p>\n<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpageparams.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/complexpageparams.jpg\" alt=\"complexpageparams\" width=\"298\" height=\"141\" class=\"alignright size-full wp-image-5883 fancy\" \/><\/a><\/p>\n<h3>Params<\/h3>\n<p>Param guide for the complex page script.<\/p>\n<h4><strong>Add Page<\/strong><\/h4>\n<p>Click this to add more pages to the content list.<\/p>\n<h4><strong>Page<\/strong><\/h4>\n<p>This allows you to select the page object to use for the this pages content.<\/p>\n<h4><strong>Delete<\/strong><\/h4>\n<p>You can delete any page by clicking the delete button.<\/p>\n<h4><strong>U<\/strong><\/h4>\n<p>Move the page up the list.<\/p>\n<h4><strong>D<\/strong><\/h4>\n<p>Move the page down the list.<\/p>\n<h3>Video Showing the Complex Page System<\/h3>\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=21m9HFyltLY&#038;hd=1&#038;autoplay=1\" class=\"fancybox-youtube\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/ytcomplex.jpg\" alt=\"ytcomplex\" width=\"680\" height=\"405\" class=\"aligncenter size-full wp-image-5884 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/ytcomplex.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2014\/10\/ytcomplex-300x178.jpg 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When adding content to your pages sometimes textures alone is just not enough so a system was added to MegaBook that allows you to add any mesh based objects to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5881"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5881"}],"version-history":[{"count":3,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5881\/revisions"}],"predecessor-version":[{"id":6089,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/5881\/revisions\/6089"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}