Lecture on creating interactive augmented reality with UI, animations, sound, and 3D object interactions using Unity.
Key Takeaways
- Interactive AR involves combining UI, animations, sound, and 3D object manipulation for engaging experiences.
- Unity is used as the development platform, with scripting to handle interactions and animations.
- Students must create AR stands that include moving, scaling, rotating objects, and triggering animations and sounds.
- Creative freedom is encouraged in model selection and AR content design to enhance user engagement.
- Practical examples from business cards to product catalogs illustrate real-world AR applications.
What the video covers
- The lecture covers creating interactive augmented reality (AR) experiences involving UI buttons, animations, sounds, and 3D object manipulation.
- The task spans two lectures and includes moving, rotating, and scaling 3D objects within AR.
- Examples include interactive business cards, menus with 3D dish models, and product catalogs with clickable links and animations.
- The instructor references previous year’s projects and Unity versions, emphasizing scripting and practical implementation.
- Students are encouraged to incorporate creativity by choosing their own models and designing interactive AR stands.
- The lecture demonstrates how to trigger animations and sounds by clicking objects and buttons in AR.
- Instructions include setting up UI elements like buttons using Unity’s TextMeshPro plugin.
- The course focuses on enhancing user experience and brand loyalty through interactive AR content.
- Technical details include managing animations, audio sources, and object properties such as materials and textures.
- The lecture provides links to previous materials and scripts to support student learning.
Chapters
- 00:00Introduction and Overview of Interactive AR Task
- 03:55Examples of Interactive AR: 3D Menus and Dishes
- 07:41Review of Previous Year’s Lecture and Sound Test Model
- 12:23Animations and Sound Interaction Demonstrations
- 17:18Learning Object Scaling, Moving, and Rotating Interactions
- 22:04Advanced Interactions: Changing Car Colors and Features
- 25:45Creative Design and Model Selection for AR Stands
- 30:29Setting Up Animations, UI Buttons, and Testing AR Stand
- 35:42Finalizing Animations and Using Scripts for Interaction
- 40:31Quality Checks and Audio Source Setup in Unity
Full Transcript — Download SRT & Markdown
Speaker A
Uh, interactions in this task, and the deadline will be about two weeks until it's done. We are also going to cover this interactive AR during two lectures: today's lecture and the next lecture.
Speaker A
today's lecture we are going to u watch about uh three uh half of this task and the task will be uh to create an interactive uh augmented reality which consists of minimum of these interactions. For example, we need to interact with UI
Speaker A
In today's lecture, we are going to watch about half of this task. The task will be to create an interactive augmented reality, which consists of a minimum of these interactions. For example, we need to interact with UI buttons.
Speaker A
that can be moved around the stand rotate and scale. And we are going to uh include all of these interactions into one stand of augmented reality. And let's uh see some examples of of this uh usage.
Speaker A
We need to interact with the animations. We should trigger them by clicking on the object and include interactive sound, such as melody or some music effects if you want, and interactive 3D objects that can be moved around, rotated, and scaled.
Speaker A
your augmented reality more interesting and useful. Uh and uh with the help of these interactions you can create uh this case and also we have um uh contribute we can contribute with the models [snorts] uh on the uh interactive menu.
Speaker A
We are going to include all of these interactions into one stand of augmented reality. Let's see some examples of this usage.
Speaker A
interesting. Uh and another usage of the uh augmented reality and this interactions is also uh when you can uh create uh some creative uh works. For example, uh these works uh was created during uh my work in our startup which was called focus
Speaker A
Here is the main usage of these interactions. You can use them for your business card and directly include your information, video, and links to the website.
Speaker A
with a special mark that it can be scanned with our application. You can see and interact uh with these products and uh it enhance uh the loyalty of uh this brand and uh includes some wow effects on it on it and it it was really
Speaker A
This is one of the usages where you can make your augmented reality more interesting and useful. With the help of these interactions, you can create this case. We can also contribute with the models on the interactive menu.
Speaker A
this work you can also plan your content uh make uh interesting uh objects and uh try to uh collect uh all of these objects inside your augmented reality with uh some creative ways. Uh and uh for example, let's uh have a look on the
Speaker A
For example, you can scan the menu and see a 3D image of these dishes. You can move and rotate this object, which means you can use these interactions to make this object more alive and interesting.
Speaker A
uh but uh I hope everything will work uh in the unity 6 because in the previous year's lecture we we used older version of of the unity and uh we are going to use several scripts uh during this work but
Speaker A
Another usage of augmented reality and these interactions is when you create some creative works. For example, these works were created during my work in our startup, which was called Focus On.
Speaker A
lecture, you will understand why we're using this coupe. But now you you can see how it was uh interacted.
Speaker A
If you can see some catalogs, for example, in this case, a catalog has included advertisement material that can be interactable with our application. By scanning some pages with a special mark that can be scanned with our application,
Speaker A
uh tell you uh more about this. And if you can uh for example if you press on the button uh you can see uh some uh links on the side uh it's uh means when we click on the object or button we can
Speaker A
you can see and interact with these products. It enhances the loyalty of this brand and includes some wow effects on it. It was really interesting to work on this content.
Speaker A
But let's uh see and the music can be uh we can listen this music and we can play some animation.
Speaker A
You can see this animation was triggered by pressing on the object, and you can present your model correctly with the help of this technology.
Speaker A
previous laptop and I uh can't uh download from them unfortunately. uh but on today's lecture we're going to also create uh some stand for these interactions and uh make some inter interactable events and the criteria uh for this works also can be u uh all of
Speaker A
In this work, you can also plan your content, make interesting objects, and try to collect all of these objects inside your augmented reality with some creative ways.
Speaker A
uh first this one and uh our previous year's lecture also uh will be shared with you uh and uh this task consist of the two parts uh and two lectures and I can share with you uh already uh
Speaker A
For example, let's have a look at the previous year's lecture. I used some freelance place. On the cube, the cube was a test model for the sound. I can also share with you the link to the previous year's lecture.
Speaker A
be possible. And on the second part, we are going to uh learn how to make uh some interactions for the scale object move and rotate. And I also can share with you this link.
Speaker A
I hope everything will work in Unity 6 because in the previous year's lecture, we used an older version of Unity. We are going to use several scripts during this work.
Speaker A
uh this one also and uh let's u maybe uh see another example of uh interactions Um for your inspiration uh according to the augmented reality uh in the menus uh you can see uh how you can uh enhance the user experience in
Speaker A
Now you can see this stand inside the augmented reality where we can interact with the objects. This cube is like a test one for the sound. If you see this lecture, you will understand why we're using this cube.
Speaker A
of photo photos inside and you can uh use this uh menu like a marker and the user will uh can be download this application and see uh how this will be look like in the real size and uh this
Speaker A
Now you can see how it was interacted with. Just one second. Let's see some. It was from the previous year. This is part of the task with several interactions.
Speaker A
Uh for example, this is the car. Uh by using some interactions, you can uh change uh the color of this car. Maybe I can you can change the color. You can uh switch on the engine.
Speaker A
For example, we can press the buttons. We can listen to the music from this cube. Later, I will tell you more about this.
Speaker A
interactions. And let's see uh some examples of the students uh from the previous year.
Speaker A
If you press the button, you can see some links on the side. It means when we click on the object or button, we can open the website that was put in this button.
Speaker A
have uh some buttons uh in the uh yeah you can move object scale rotate uh open site uh open the website uh link and uh we also have some sound and we have uh played animation by pressing some buttons
Speaker A
Then we can also click on the object and play the animation. Let's see. The music can be listened to, and we can play some animation.
Speaker A
Uh every work uh in this um track uh should be included some creativity from you. Uh you can choose uh models uh as you want. uh you can plan your stand uh you can um how it calls design your work
Speaker A
We can listen to the music from this work and play animation by pressing the button. In today's lecture, we are going to recreate some stand but with different objects because these objects are on my previous laptop, and I can't download them unfortunately.
Speaker A
Uh for the skill move and rotate we using uh this uh uh user interface um switches uh because we don't have opportunity to interact with the objects uh in uh by pressing on the um uh how it calls
Speaker A
In today's lecture, we're also going to create some stand for these interactions and make some interactable events. The criteria for this work also include all of these four interactions.
Speaker A
this object. uh without any uh additional UI interface uh you can directly move uh this object rotate and uh turn around.
Speaker A
I will share with you the list of interactions, and we are going to cover all of these lists during our lectures.
Speaker A
Uh but uh for using these uh scripts it should be uh also you should build your application and install this application on the device uh and without this device uh in and application build it not uh it impossible to um uh play uh
Speaker A
First, this one and our previous year's lecture will also be shared with you. This task consists of two parts and two lectures, and I can share with you already two parts from the previous year.
Speaker A
Uh okay. Uh but next uh what we can do we can see another examples maybe uh from the previous year we have interesting use cases here.
Speaker A
You can start making this task earlier instead of me. If you want to finish this earlier, it is also possible.
Speaker A
uh by pressing the icons. Uh this is also it's like uh mini game inside of this task. It's also was uh really um huge uh work on this uh task by pro programming all of these interactions.
Speaker A
In the second part, we are going to learn how to make some interactions for scaling, moving, and rotating objects. I can also share with you this link.
Speaker A
object uh interact with the buttons. We can uh switch on and switch off the music. And also we have some uh scale rotate of this object.
Speaker A
To sum up, this interaction task consists of four interactions included and consists of two weeks of lectures, two parts of these lectures. During today's year, we are going to recreate this one also.
Speaker A
And uh uh this 10 uh is uh interesting for showing and uh you can see objects is also has interactions on it. We have some link and uh when he press button is also uh some link outside sound
Speaker A
Let's maybe see another example of interactions for your inspiration. According to augmented reality in menus, you can see how you can enhance the user experience in the restaurant and create realistic models.
Speaker A
website uh interactive animations, interactive sound and on the next lecture we are going to learn how to uh change uh inter uh the scale, rotate and uh move object inside of the augmented reality system. Uh okay. Uh maybe we can
Speaker A
You can also show your customers how this dish looks instead of using just photos in the menus. Some menus don't have the ability to use a lot of photos inside, and you can use this menu like a marker.
Speaker A
Why my application Okay. Uh, open our previous project. Uh in in this project we made uh some animations and um we can create another stand in this project. Uh but in inside of the project we already have settings
Speaker A
The user can download this application and see how this will look in real size. This experience is also like game mechanics inside, and it's interesting.
Speaker A
and we will start u in this 10 uh and let's check that we have uh opportunity to work with the wia uh Yes, we have the camera and we have image target. But before we include this Voria settings, uh let's uh set up our
Speaker A
Another experience is you can create some 3D objects, and these 3D objects can be interactable and playable.
Speaker A
some folder for for all of these 3D objects. uh to collect everything into this folder. It will be easy uh to manage uh this um work. Uh and for today's lecture, we also can uh find several uh objects and uh combine from them one.
Speaker A
For example, this is a car. By using some interactions, you can change the color of this car. You can switch on the engine and open the doors.
Speaker A
some diagram in augmented reality where we have uh some sand uh beach uh beach some uh animated objects uh some main object interactable uh and other object objects can be scale, rotate and move.
Speaker A
On the buttons, there is also some sound like a car engine. When it's played, you can hear the engine of this car. This is also an interesting example of these interactions.
Speaker A
sketch fab because I have uh it's easy to download objects uh for uh with right format and uh this is also example of the stand that you you can use uh in the augmented reality. For example, you can interact
Speaker A
Let's see some examples of the students from the previous year. Let's see random work from the previous year.
Speaker A
Uh plan your uh and design your stand uh according to your feelings, according to your interests and uh your creativity.
Speaker A
You can see we are going to use the Vuforia and the camera from Unity and laptop as well. Now you can see we have some buttons.
Speaker A
Maybe uh I will start with uh with this thing and try uh the uh to enhance uh this object uh with the different uh animated object something like this. Uh we can include some objects for the moving rotation and uh maybe uh some
Speaker A
You can move objects, scale, rotate, open site, open the website link. We also have some sound, and we have played animation by pressing some buttons.
Speaker A
be properly assigned. Uh and uh if your uh objects will not have some textures uh you will get some minus points for the appearance of your project. Uh and try to uh create a nice looking uh object and uh projects.
Speaker A
This is an example. Let's see another example with a more interesting setup.
Speaker A
Yes, this OB obg works. Let's extract materials into the current uh current folder and uh let's try to assign some textures. Uh let's have a look on this model.
Speaker A
Every work in this track should include some creativity from you. You can choose models as you want. You can plan your stand.
Speaker A
uh but uh this object inside uh is uh not uh selectable uh it's combined like a one object but some sense when when you can download it can be a separated object inside uh you can uh download try
Speaker A
You can design your work with some interesting cases. In this case, it's like a desktop with interactable events. You can see how it works. This opens the site, and this is the count.
Speaker A
and this object also has uh a lot of maps inside and we can uh use uh some of the desk interactive because we have uh roughness map here.
Speaker A
For the scale, move, and rotate, we use this user interface switches because we don't have the opportunity to interact with the objects by pressing on the pan, pitch, and zoom screen.
Speaker A
And also we have uh roughness map really informs uh your appearance of this object. And you can see uh how this roughness uh can uh improve uh the specularity of this object. And it's also looks nice.
Speaker A
Okay, in these cases, as we saw previously, you can see...
Speaker A
and play with them and build the stand. And maybe we can use this one for the moving object. Uh we need uh the stand, we need animated object uh and we need some object uh which can be moved,
Speaker A
rotate and scaled and after after that we can uh build uh add some buttons on it.
Speaker A
Uh let's check uh the second object uh which is animated. Uh and uh in the inspector you can uh watch and see uh if it if if animation works well. Uh if some materials correctly appears here and uh does uh the textures also uh has
Speaker A
a good format and uh we can also add the second object here. Uh the second object is really small uh according to the our first one and we can uh use inspector to increase uh the scale of this object.
Speaker A
Maybe uh little bit smaller. Unfortunately, this object not movable. Uh but let's try to work uh with this sand and uh build some interesting uh work.
Speaker A
And uh let's go uh to the settings and change materials. One object uh has uh two uh separated parts and uh also it has animation and we can uh play animation on entire object.
Speaker A
Uh okay let's uh assign some textures on it. We can select body. Uh we can assign some base material.
Speaker A
This shader not affect on anything. And let's try to change the color. Uh this one is just a black color. Uh but main color is looks normal. Uh we have this uh this is should be transparent material here. Uh and uh what we can do
Speaker A
uh we can change uh the type of this material from the uh surface type from the apach to transparent. And now it will be able uh to use some transparency on it.
Speaker A
And uh and where is the trans index of transparency? Maybe we can use some transparent material from here.
Speaker A
one. Uh this one is more transparent now. And we can see uh this is already transparent and can be useful in this case. And uh let's continue uh set up our u materials here. Uh let's switch to the after desk interactive.
Speaker A
uh use some color, use some normal, uh use some metallic map. If you see uh that you have a lot of maps, it's better to use uh after interactive uh because it render uh correctly and uh here is in after
Speaker A
interactive we have this roughness map and it uh really enhance the quality of your uh render of 3D object and uh also uh we have some AO map at it. Uhhuh.
Speaker A
uh where we can switch uh you can go to the shader uh go to the universal render pipeline if your project in this uh was created as universal render pipeline and here is in after desk in practice inside
Speaker A
yes uh this one yes yes it means you have a project with the user uh universal render pipeline, universal render pipeline understand only uh their uh shaders and uh if it not works uh you should go to this folder universal
Speaker A
render pipeline and click uh to the included inside. If you use just a simple 3D project, it's better to use just a simple ob uh shaders uh from here uh not included into the universal render pipeline.
Speaker A
Uh and uh what else we have? Uh let's see uh that we uh managed all of these uh shaders that we have. Yes. Uh it's done.
Speaker A
And uh let's come back uh to this uh project. uh and assign some uh animations on it.
Speaker A
Uh for the animations uh we are going to uh use our animator controller. We are going to create animation animator controller and include some uh created uh create some animation animator controller and it will be our player.
Speaker A
And inside of this player we are going to use our animation uh the same as we did uh previously uh in the uh work with the animation AR we assigned this controller and let's see how it works.
Speaker A
Uh now this animation works well and this animation is also looped. Uh let's uh switch off uh the loop of this animation. Uh it's not looped.
Speaker A
Uh it's really uh long. We have uh uh 279 frames for this animation. It's really long uh for the interactions when uh we are going to play this animation on the pressing on on this. And if you want you
Speaker A
can uh for example uh decrease the length of this animation or maybe we can keep it the same but it's really long. Uh for decreasing the uh length of the animation you can use this uh button uh and uh cut your
Speaker A
animation whatever you want. For example, we can start from the five seconds and play uh for the opened uh and uh hit apply after changings. And when we start uh playing this animation, you can see how it opens. And uh you can
Speaker A
change animations in the inspector as well. And let's uh start from this one. Uh what next? Uh I'm going to change some shader for this transparency uh to the both render faces uh because when it's closed we we didn't see from it
Speaker A
and uh the transparency can be also uh appears in the base color and we can change this base color for more darker one and uh with the alpha you can uh increase the transparency and Now it's more more uh good looking instead of the
Speaker A
previous one. Let's save our project. And uh what else we have? We have uh some object. Uh we have some animation here.
Speaker A
And uh we have uh some we have to include uh some scalable object. Maybe we can use uh the cassette which was downloaded.
Speaker A
I think it's uh useful uh useful. Uh let's call it uh object three. Uh the same process. Extract materials uh put uh into the stand uh change the scale.
Speaker A
Uh we can change it even more. Uh this one is too too small. I think this one is uh suits well and uh this object will be we can move, rotate and scale uh for example work with this
Speaker A
object. Uh and let's uh set I forgot some textures. Let's uh include some textures.
Speaker A
Uh this object also has uh some uh materials on it and uh suits uh for entire our 10 uh stand design and uh let's use some color.
Speaker A
Uh let's use some normal map. Uh fix use. Uh this one is appears correctly uh with the errors arrows. Uh and uh what we can do now uh we can use some metallicness on it and some roughness now. It uh looks uh I think it looks
Speaker A
nice. Uh okay. Uh let's make some interactions on it. Uh for this uh task I'm going to use uh two scripts uh which calls open web. Uh I can include uh this into my folder. Uh I can use my interaction folder and I can drag
Speaker A
and drop this script inside and see uh how it's um processing. I can also share with you uh with this script. I will send you into uh the folder in into the telegram group and we are going to use this open web script uh for
Speaker A
making some interactions to open website and uh for this open website I'm going to use some uh YouTube button and I'm going to use some uh animations on this YouTube button as well. Uh let's download this YouTube button.
Speaker A
This has Blender format. I should uh use some blended for converting this object. It's not downloaded.
Speaker A
Maybe we can use another YouTube button. Uh this one also has a B format. Why it's not downloaded?
Speaker A
Ah, now it appears. Great. Uh another object that can be used for our open web. Let's call it object three.
Speaker A
Object four. Okay. Uh And the same we are going to change uh the colors uh set up some shaders uh textures. Drag and drop pure.
Speaker A
Why it's rare? It's already have several animations, but we can create another animation for this one. And let's extract materials.
Speaker A
And we have some textures for it. Roughness and metallic. Uh but maybe we just uh can use this object. Uh it's also has some camera. Uh you should delete this camera from this one.
Speaker A
Shadow catcher is also not uh useful. Let's delete. And we just need to only uh use this 3D 3D object.
Speaker A
Uh let's uh change the scale maybe even more. And now uh we're ready to start uh working with some canvas on this project. Uh we can uh also change the scale and rotate uh plan your uh stand uh move objects around. Now we have uh
Speaker A
this send we can put this button here and when I'm pressing this button I'm I want to make some animation of it. Uh for example uh like in the previous year we did uh some animations and I will uh I can show you how you can
Speaker A
create animation inside of the Unity. uh the simple movement animation something like this uh like a pressing on the button and we are going to uh use this button later uh but now uh let's create uh some canvas uh for this t let's save this 10
Speaker A
and uh for the better uh we have uh separated object now and uh for the combining all of these objects into the one object object group. You can create uh empty game object. Call it some group uh or call it some uh content.
Speaker A
And uh we can drag and drop all of this content inside of this group. And now uh we will able uh to move uh this group around.
Speaker A
and even rotate if you want. Uh this will be our common group uh for this object. And also you can create uh some prefab from this. Uh when you set up everything inside, you can create the prefab. And this prefab can be uh uh
Speaker A
like one object of this one. Uh and if you want to move uh this all of these objects together into the another stand uh you can use uh this prefab it's like a uh folder all of these uh
Speaker A
objects and all of these objects is already has some setup inside. Uh this codes the prefab in the unity. Uh what else we can do? Uh we should uh start making our buttons for the interactions.
Speaker A
uh for buttons for the interactions we we can find uh in the UI and let's create the canvas uh canvas appears with the event system uh this event system uh calculates automatically if you need uh you can fix
Speaker A
uh this input system model uh in the previous year it should be uh fixed some issues but now it works uh correctly already and uh by the default uh We have the canvas appears overlay in the stand.
Speaker A
Uh for example, let's uh let's put inside the canvas some button. We can go to the UI and find some button. If we create this button uh we can import text mesh pro uh plugin inside uh from the
Speaker A
plug-in manager. Uh and now it works correctly. When we uh open the game view, you can see buttons appears above the stand. It means uh we have uh some canvas settings, screen space overlay.
Speaker A
For the augmented reality, we need to include buttons into the stand of the augmented reality. And uh for this canvas, I'm going to change uh the render mode to the world space. And now we can change the scale of this canvas.
Speaker A
Uh and uh for example, width and scale scale can be uh smaller. Let's use this one. And we can change the position of this uh canvas. And we can uh put this canvas above our sand.
Speaker A
Uh where is our content? Our content is too small uh for this canvas. Uh we can increase the size of the uh canvas or um we can scale uh this canvas little bit.
Speaker A
Uh we can uh use some scale button. Sorry. And uh put uh this button on our table.
Speaker A
And we can change uh rotation of this canvas as well. Uh and change position uh and we can put the button uh into the on on the table. For example, uh this button also can be uh smaller.
Speaker A
You can change the width and height of on it. Uh you can change the name and the color of this button. Let's use some black color. And for the text inside, we can change the color to the white.
Speaker A
Uh change the color to the white. And we we already have some button. And uh here we can uh type uh some text inside uh and hit the click for example. And uh what else you can change? You can change the uh font size
Speaker A
uh you can change uh the you can download some font uh from the internet and uh include here uh in the assets and use uh several fonts here. But we are going to use just simple one.
Speaker A
And uh let's uh switch on some gizmos little bit. Uh and now we're ready uh to set up uh this button interaction. Uh but uh before we are going to set up button interactions, I'm going just uh use my uh simple main camera in this 10.
Speaker A
Uh I need to rotate this camera uh put it uh in correct position uh for uh better testing.
Speaker A
Uh it's easy uh to test my uh entire stand uh before we make it uh augmented.
Speaker A
And maybe I can move this camera a little bit closer. Uh we should be able to click uh on this 10 uh on this object something like this.
Speaker A
And you set up uh this main camera. uh before we are going to use uh the camera of augmented reality.
Speaker A
Uh our sense should be in focus and our buttons should be also in focus. Uh okay, let's save this 10. Uh and let's come back to the button. Now we have the script open web. uh we have if we open
Speaker A
this script we can see it's just a simple uh URL link that can be uh open uh any link we here uh okay uh and uh we're going to use this open Uh okay. Uh for using this script open
Speaker A
web we should select uh button and uh we can drag and drop this script uh in the button and it appears here and we can see uh that we have uh a u input field for the URL link. Uh we can find any
Speaker A
link you want. For example, you can open uh our previous lecture on it. Uh we can copy and paste uh URL link here and uh to make this interactions uh let's uh hit on click on click event uh and uh we should use
Speaker A
object uh with this event. We can drag and drop the same button here and we can use open web uh script here and we should find here on open link uh open click open web uh and uh if you select this one now it's
Speaker A
uh can be interactable. Let's uh test this interactions. Now if we hit some play we can open the link. Uh first task uh is made uh interact UI buttons with uh with the click open web.
Speaker A
Uh this first task uh is made. Uh the second task we should create another button and play animation on it.
Speaker A
Uh how we can play animation? Uh we can uh create another button here in the same canvas. Uh the canvas is like a folder for all of these UI elements. Uh in this uh perspective uh we can create another
Speaker A
button here. Uh and uh from the UI uh we can find some button. It will be our second button. Uh we can move it over there.
Speaker A
And I'm going to use this YouTube button and create uh some animation of this button. And when I hit uh this uh button, I'm going to uh use uh some animation of this YouTube.
Speaker A
Uh for example, let's uh delete this text from here. And inside of the button, uh we can uh switch off uh the color and make it uh make it transparent.
Speaker A
And now we have uh this button uh but it uh it's like for the interactions because we have this 3D element and we need to uh also uh calculate this interactions uh when we hit uh this button. Uh next
Speaker A
let's change the animation of this YouTube. This YouTube don't have any animations. Let's uh add some animator on it. Uh this is our first object. And here I'm going to create animation controller and call it YouTube.
Speaker A
Uh and I'm going to apply this animation controller on uh this one. And I'm going to use uh animation uh in the uh unity. I'm going to animate this object inside uh the unity. What we can do uh this animator
Speaker A
controller is already assigned on this object and we we will be able uh to create new animation clip on it. Uh let's create and call uh this animation YouTube.
Speaker A
Let's maybe make it you just simple as we we have. And inside of this animation when we click record, we can record uh any movement of this object.
Speaker A
And now when we change the position of this object, we can see uh that we have uh uh this animation and uh where is my object? Oh.
Speaker A
Uh maybe we can drag and drop it here uh for better uh scene. Maybe over there something like this. And uh when we hit record it and when we play it we will get some animation. Uh but let's change
Speaker A
uh it a little bit. We can delete uh this case around and uh let's uh move it slightly.
Speaker A
Uh let's hit record. Move it somewhere there. Over there. Uh we have uh 30 seconds and uh lead uh just simple move of this object and hit the play to check uh this button. It's like a pressing on the button animation.
Speaker A
If you satisfied with the uh uh speed of this animation, if you have less um uh less frames uh between the case, you will get the faster animation. If you increase uh the length of uh the frames, you will get slower animation.
Speaker A
And when you finish uh switch off, uh the recordings. Uh okay. Uh we recorded this YouTube animation. And this YouTube animation is loop time. We should switch off this loop time. Uh when we select the animation, let's drag and drop this animation near
Speaker A
the uh console. Uh now we have in the animator, we have this uh u U here. Let's delete this one.
Speaker A
Uh for the interaction on the button, uh we should create uh empty state. Uh first we create the empty state. After that we can drop drag and drop U animation and make some transitions from the U to empty state.
Speaker A
Uh and let's uh create interactions on the button. uh and also in this 10 uh we can change the button name uh to understand which one for what this one uh the click URL this one for the YouTube
Speaker A
and now inside of this uh buttons we have interactions uh we can click on this interaction functions assign uh this uh button object here. Open uh sorry, let's make it again. Uh let's drag and drop our YouTube button here.
Speaker A
And now uh we drag and drop it uh animated object into the button. And now we can change uh the animator here. And we can play string function. When we select the play string function, we can call animation view uh that we already
Speaker A
created. And now uh if we uh uh play our sand, let's check how this works.
Speaker A
Uh now uh this animation is not appear right now. When we click uh this animation plays uh it's like on pressing or on any button. We can play any animation by using this on click play string.
Speaker A
And now what we can do uh we can also include another open web here. Uh for example we already have this open web.
Speaker A
Uh we can drag and drop script on the second button. And we can open another YouTube link here.
Speaker A
For example uh this one will be opened on the second uh button. And now we can add another interactions uh with this button. and uh hit open web on click open web function and now we have uh two
Speaker A
buttons that has uh interactions. First one is for uh open web only. Uh when we click we open our lecture uh and if we uh click on the second button we have animation and open web.
Speaker A
Uh but I think uh it's better to keep only animation. Maybe um we can delete this one.
Speaker A
Uh okay. Uh maybe it's only animation will be up here. But it's uh interesting that we did uh transparent button here that imitates uh this 3D uh icon. And when we hit play uh on it, it moves.
Speaker A
Uh the second one I'm going to show you how to use uh some buttons uh with some icons. Uh for example, we can use icon uh for playing this uh animation of this object. Uh we can also create another
Speaker A
button inside the canvas. Let's create a button. Uh it will be our third button and we can put it uh for example over there.
Speaker A
And I'm going to find some icon uh for the player. Uh I can use some free pick.
Speaker A
Uh with the free pite you can find any PNG icon, any icon, flat icon. Uh you can download uh transparent object.
Speaker A
Uh we can find some button for it. Uh maybe this one. Uh we can download uh PNG pre-download and we can use this icon uh instead of just a button.
Speaker A
Uh we can uh download this clipper and let's put it into the uh our interaction send. I'm going to uh drag and drop uh this icon here in in the settings of the icon. Uh we should change the property from the
Speaker A
default type uh to the uh sprite uh 2D and UI. Hit apply. And we can use this uh UI like our button. And we can drag and drop source image here. And uh use this UI component.
Speaker A
We can drag drag and drop um let's use uh here. Now we have this sprite uh with the uh sprite mode single. Now it's uh we can able use this clipper uh inside here and let's change uh the width and height uh
Speaker A
to the uh square size and also we should uh uh remove the text. And now we have this button here.
Speaker A
Maybe we can move the canvas and uh move our buttons little bit. Our buttons should be uh inside the canvas.
Speaker A
And now we are going to use this button with icon uh for the second animation of uh this entire object. Uh this object has uh their own animator. And inside of this animator we already have this animation. Let's delete this animation.
Speaker A
Create new state empty state and drag and drop this animation again and make some transition on it. Without these settings we uh will get animation uh without pressing the button. Uh this empty state it's needed to switch off
Speaker A
the animation and on the interactions of this button. Uh let's on click uh assign our uh 3D object uh here.
Speaker A
Sorry. Uh let's select our button. Uh let's rename it. Call it for the animation.
Speaker A
Uh does it understandable for you what I'm I'm doing now? Uh everything is clear by now.
Speaker A
Okay. uh we making uh some interactions and uh by pressing of this uh button with the icon. We can play uh this animation on this object. Uh without pressing the button uh object will not have animation. Uh and what have we uh
Speaker A
we should select uh our button uh assign new event here. drag and drop our object with the animation inside and select animatra function uh with a play string.
Speaker A
And now we have uh the have to copy all of these uh name of this animation. It's difficult because it's really long. And uh if we select the object with animation, we can change the name of this animation. Let's call it just like
Speaker A
anim and uh hit apply. And now uh we can use this string inside of this third button.
Speaker A
And uh just be sure that uh our animation uh connects properly. Uh and now we can uh select this button and uh type uh the name of this animation anim uh with the uh k this string is case sensitive. If it's caplo has caps
Speaker A
lock you should use caps lock. If not have not use this one. The same uh like as the name of this animation.
Speaker A
And now let's test uh this entire interactions. Uh now we did uh one animation playing and the second animation playing.
Speaker A
Now this animation appears only when we uh click on it. Uh it's better to uh change uh the animation for the full length. now and also switch uh the loop time and every time when we press the button animation will start.
Speaker A
Uh this is a really long animation that we should wait and press again and it's it is works.
Speaker A
Now we did uh the uh second task uh of our our entire plan. Uh we managed to make animations inside of the Unity. Uh we are working with the button and using the already created animations. Uh and they triggered by clicking on the object
Speaker A
and on the button. Uh the third one is interactive sound. Uh this one is a little bit complicated. We are going to use another uh uh another script uh for this task. Uh I'm going to open uh sound controller.
Speaker A
Uh this script will help us to use augmented reality raycast. Uh and when we hit uh the object as well uh we can play uh anim sound when uh we clicked on the object uh without any buttons just
Speaker A
object. Uh for the testing this uh sound animation I'm going to use uh just a simple cube for now. Let's open this sound controller uh script and see what uh it's doing. [snorts] Uh this sound controller uh need uh one
Speaker A
animation uh uh one audio clip. For the audio clip, we should download any MP3 file uh in the internet. We also should create some audio source and we also have the button. Uh button will be our 3D object. Instead of using the canvas,
Speaker A
now we finding uh the with the ray cast uh from the augmented reality camera and by find founding this uh object and when we press uh the object which is called cube, we can play the animation. Instead of using uh just a simple button from
Speaker A
the UI canvas, we are going to use 3D object. And for now uh this object will be just one simple cube. We can create a 3D object cube.
Speaker A
And I'm going to put it uh anywhere. Uh let's scale it a little bit and uh put somewhere on the table.
Speaker A
uh this object uh should be uh simple uh to uh to press maybe uh I'm uh on the next lecture I'm going to use uh another object but uh for now I'm going to use just a simple cube uh to make uh
Speaker A
to test uh this script before and also I will send you this sound controller script into the Telegram group and uh this uh script use every time the cube object because it's uh inside the code. Uh if you change the name uh of
Speaker A
your object here uh you can use your own object. Uh but for these cases be careful that you should use this cube because it's inside of the code. Uh and next what we can do we can download uh
Speaker A
we can put here uh some MP3 file. Uh let's check. I'm I have one music and I'm going to use this music uh for the testing uh our uh sound controller clip uh script. We can drag and drop into the Unity and use
Speaker A
this uh one in the Unity. Uh okay. Let's check that we have I hope this will work inside the Unity.
Speaker A
Next what we can do now uh for the working with this uh script uh we need uh to assign some augmented reality in this stand. Uh let's delete our camera.
Speaker A
Or maybe we can hide this camera. Uh untag this camera. Uh and uh uh we can create our uh Vuoria engine camera.
Speaker A
Uh this is already has settings inside. Uh next what we can do uh we can uh create our image target and put every object that we made uh in the image target. Uh we drag and drop our content our canvas
Speaker A
uh event system not should be inside of the uh image target. We can drag and drop our cube. And that's all. We have air camera image target. Inside of the image target, we have all of our content and uh UI elements. Uh and now we should
Speaker A
select uh from the database. I'm going to use my database. And uh hit some maybe dragon or tiger.
Speaker A
And now uh we should change uh the size of our objects. And I'm going to put everything into my content and uh change the scale of these objects according to my uh marker. Uh for the better appearance into the stand of the
Speaker A
augmented reality, I'm going to scale it little bit. uh put it over there. Rotate whenever we want. Uh put it above the marker. And uh the marker itself uh you shouldn't scale uh you should scale only the content
Speaker A
inside. And for the better scaling and not ruining my uh setup of this 10, I'm using just one fold uh folder inside.
Speaker A
And every object is just like a parent of this uh s. And let's save this one. And let's try our augmented reality.
Speaker A
Uh let's try that everything appears correctly. You can see now uh how the quality of these 3D models looks like.
Speaker A
Uh you can see our buttons and uh even UI buttons uh also included to the uh content and this UI buttons is just a part of the entire stand and uh you can able to interact with them. When we hit
Speaker A
this play, this opens. Uh this animation is also works by pressing the mouse and uh clicking it's opened our YouTube.
Speaker A
Let's come back to our stand. And now we should uh test our cube like a uh sound controller.
Speaker A
Okay. Uh for the sound uh we already have the uh cube in the stem.
Speaker A
Uh let's uh add uh script inside IR camera. Uh this script should be assigned on the IR camera. Let's drag and drop this sound controller into the air camera. And uh here you can see uh if you opened you have the list of the
Speaker A
clips. Uh you should press uh plus icon and drag and drop audio file here. This will be audio file. Another one what we should do? We should create uh some uh sound controller here.
Speaker A
Uh we can uh add some component uh to the cube and create a sound controller. Uh audio source uh this audio source means uh in which area and uh how it's like an uh source of the audio. Uh and you can
Speaker A
change the position of the audio uh uh make some settings of it but uh don't don't include some audio inside of this audio source. We are going to use just this source. And now we can drag and drop uh this cube
Speaker A
uh into our audio source because we have audio source on the cube assigned with the left mouse button. We can drag and drop this inside or maybe uh we can delete uh where I put the outer Sorry, audio source was not assigned it. Uh
Speaker A
let's make it again. Uh we need audio source for making this uh happens. Ah we have audio source on the image target.
Speaker A
It is wrong. We should remove uh this component from the image target. We should assign on any object inside. Uh let's component add some component audio source on the cube. And now uh we can able to continue setting up this sound
Speaker A
controller script. Uh let's go uh to the image target. Uh find some cube and drag and drop it here. Now it's assigned it. Uh we uh set up clip first the second uh audio source where this music will be appear. And now
Speaker A
uh we can press play. Uh we are going to use our uh marker. And now uh we have uh some errors.
Speaker A
Okay. Uh let's delete audio source from the cube. Uh and aside assign them directly into the our camera audio source assigned it on the camera and we can drag and drop the same camera in the audio source. Inside of the uh
Speaker A
our uh script, we have this debug lock uh button. When we press the cube uh in the console, we should see uh the button. If everything works correctly uh and you didn't see uh hear the sound, it means
Speaker A
uh the button is not work. And uh if this uh debug block uh C is in the console uh it means uh you sound is quite just okay. Let's continue uh testing this.
Speaker A
Okay. Now we have our animation and we have a lot of errors. Uh we have error on the 19 uh line uh get mouse button. Maybe this event uh is not uh possible uh to use on the Unity 6. Uh let's try uh to
Speaker A
let's stop our animation and find some issues. If you click uh here and now we should uh find uh how uh get mouse button uh should works in the new unity.
Speaker A
Uh we should modify our uh script a little bit and uh change uh the method of the mouse button.
Speaker A
Uh we are going to change to the new method of using this mouse event. And uh here inside if we press this mouse is pressed.
Speaker A
Maybe this one will help us uh to use this script uh in our Unity 6.
Speaker A
Come on. mouse position. Ah, it's like this mouse current position read value. Let's try to use this one.
Speaker A
Uh, more should Pressure doesn't It's no problem. The back lock button. UI. Fore! Foreign! Foreign!
Speaker A
book. Foreign speech. Foreign speech. Foreign
Topics:augmented realityinteractive ARUnity3D object manipulationanimationsUI buttonssound effectsAR developmentinteractive contentAR user experience











