{"id":964,"date":"2017-12-01T20:58:18","date_gmt":"2017-12-01T19:58:18","guid":{"rendered":"http:\/\/jmladeno.net\/?p=964"},"modified":"2017-12-28T15:30:50","modified_gmt":"2017-12-28T14:30:50","slug":"tutorial-for-streaming-markers","status":"publish","type":"post","link":"https:\/\/jmladeno.net\/index.php\/2017\/12\/01\/tutorial-for-streaming-markers\/","title":{"rendered":"Send LSL Marker streams from Unity"},"content":{"rendered":"<p><strong><em>Send Markers (Events or Triggers) from Unity<\/em><\/strong><br \/>\n(tested on Windows machines only)<\/p>\n<p>1. Create an empty game Object to contain MarkerStreams scripts, so you can call it MarkersStreams<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/MarkerStrms-300x269.png\" alt=\"\" width=\"300\" height=\"269\" class=\"aligncenter size-medium wp-image-1088\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/MarkerStrms-300x269.png 300w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/MarkerStrms.png 491w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>2. Go to the Scripts folder from the LSL4Unity folder, to access LSLMarkerStream<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture7-300x164.png\" alt=\"\" width=\"300\" height=\"164\" class=\"aligncenter size-medium wp-image-921\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture7-300x164.png 300w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture7-768x419.png 768w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture7-1024x559.png 1024w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture7.png 1344w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>3. Drag and Drop the LSLMarkerStream script to the newly made game Object.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/DropMarker-300x208.png\" alt=\"\" width=\"300\" height=\"208\" class=\"aligncenter size-medium wp-image-1091\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/DropMarker-300x208.png 300w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/DropMarker-768x533.png 768w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/DropMarker.png 817w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>4. go to your script in which you manage events, triggers or collisions.<br \/>\nIn Roll a Ball, it is in PlayerController:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture10-300x254.png\" alt=\"\" width=\"300\" height=\"254\" class=\"aligncenter size-medium wp-image-927\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture10-300x254.png 300w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture10-768x651.png 768w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture10.png 866w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>5. Double click this script and add a bit of code in it<br \/>\n<div id='gallery-1' class='gallery galleryid-964 gallery-columns-3 gallery-size-large'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"374\" src=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture11.jpg\" class=\"attachment-large size-large\" alt=\"\" aria-describedby=\"gallery-1-935\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture11.jpg 753w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture11-300x149.jpg 300w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-935'>\n\t\t\t\t1. use LSL4Unity library, and 2. define marker as LSLMarkerStream object\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"285\" src=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture12.jpg\" class=\"attachment-large size-large\" alt=\"\" aria-describedby=\"gallery-1-941\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture12.jpg 809w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture12-300x106.jpg 300w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture12-768x271.jpg 768w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-941'>\n\t\t\t\tattach to marker the script LSLMarkerStream used in Unity\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"303\" src=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture13.jpg\" class=\"attachment-large size-large\" alt=\"\" aria-describedby=\"gallery-1-942\" srcset=\"https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture13.jpg 817w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture13-300x111.jpg 300w, https:\/\/jmladeno.net\/wp-content\/uploads\/2017\/12\/Capture13-768x285.jpg 768w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-942'>\n\t\t\t\tsend Marker (Trigger or Event) each time the ball collides with an object, here called &#8220;Pick Up&#8221;\n\t\t\t\t<\/figcaption><\/figure>\n\t\t<\/div>\n<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Send Markers (Events or Triggers) from Unity (tested on Windows machines only) 1. Create an empty game Object &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-964","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/posts\/964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/comments?post=964"}],"version-history":[{"count":10,"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/posts\/964\/revisions"}],"predecessor-version":[{"id":1127,"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/posts\/964\/revisions\/1127"}],"wp:attachment":[{"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/media?parent=964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/categories?post=964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jmladeno.net\/index.php\/wp-json\/wp\/v2\/tags?post=964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}