Uploaded July 2022 | Updated December 2026, 3 hours ago
We're starting a new project beginning with an introduction to SignalR. Our goal is to introduce SignalR into a Unity project so we can communicate in real-time between a Unity game and a web app. In this video we'll introduce SignalR, an open-source (github.com/SignalR/SignalR) library that allows us to create a client server communication system in our apps enabling them to send messages back and forth between clients.
If you would like to get started learning SignalR you can learn more at https://aka.ms/getstartedsignalr
My previous SignalR series shared at the [Microsoft Reactor](youtube.com/c/MicrosoftReactor1/) where we created an interactive canvas you could collaboratively draw on with the rest of the world!
1. [Building Real-Time Web Apps with SignalR](youtube.com/watch?v=k5rdhYj6TB8)
2. [Connecting a Web App to SignalR](youtube.com/watch?v=c0zmYjQ8KWA)
3. [Creating a Real-Time Web Canvas](youtube.com/watch?v=hgq1CYEJg_Q)
You can see some of the other content I have planned outside this channel in the Microsoft Reactor (and even come to our in-person events) at the [Microsoft Reactor San Francisco Meetup Page](meetup.com/Microsoft-Reactor-San-Francisco/).
***
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
We're starting a new project beginning with an introduction to SignalR. Our goal is to introduce SignalR into a Unity project so we can communicate in real-time between a Unity game and a web app. In this video we'll introduce SignalR, an open-source (github.com/SignalR/SignalR) library that allows us to create a client server communication system in our apps enabling them to send messages back and forth between clients.
If you would like to get started learning SignalR you can learn more at https://aka.ms/getstartedsignalr
My previous SignalR series shared at the [Microsoft Reactor](youtube.com/c/MicrosoftReactor1/) where we created an interactive canvas you could collaboratively draw on with the rest of the world!
1. [Building Real-Time Web Apps with SignalR](youtube.com/watch?v=k5rdhYj6TB8)
2. [Connecting a Web App to SignalR](youtube.com/watch?v=c0zmYjQ8KWA)
3. [Creating a Real-Time Web Canvas](youtube.com/watch?v=hgq1CYEJg_Q)
You can see some of the other content I have planned outside this channel in the Microsoft Reactor (and even come to our in-person events) at the [Microsoft Reactor San Francisco Meetup Page](meetup.com/Microsoft-Reactor-San-Francisco/).
***
Join the World of Zero Discord Server: discord.gg/hU5Kq2u


![Calculating Dice Sides From A Meshs Normals
Today I wanted to take a closer look at an older video where we built a dice roller that used Dot Products to determine which face on a dice was rolled. The problem with that original solution was that you would need to manually enter each of the dices vertices to get an accurate result. Thats easy enough with a 6 sided dice, but becomes extremely annoying and tedious when you add more sides at awkward angles. Fortunately one of the things programming is great at is automating tedious things and thats exactly what were going to explore here.
The solution Im hoping to build is fairly straight forward and actually doesnt take much time at all. We can extract normals from a mesh and then take the distinct set of normals as the set of possible sides for our dice. This actually can be written in a single line of code with some LINQ.
```csharp
Vector3[] CalculateNormals(Mesh mesh)
{
return mesh.normals.Distinct().ToArray();
}
```
The solution has a few issues though and well take a look at how we might solve some of them. When looking at an object like a cylinder for example well get a large number of sides calculated because each edge of the cylinder is a unique side of our dice. We probably dont actually want that to be the case. Well design a way we might be able to solve this before stepping back and taking a bit of a longer look at the problem.
The basic question of getting unique sides for a dice is solved, but if we want to advance this solution for more complicated shapes and allow it to handle not quite aligned vertices well need to do some more work. If you have an idea for a design, let me know! Otherwise Ill be here designing something to help us provide another solution.
The original Dice Roller was built in this video: https://www.youtube.com/watch?v=hmDF9PvMDVw
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Calculating Dice Sides From A Meshs Normals](https://i.ytimg.com/vi/0Rnj7YQJfrc/mqdefault.jpg)
 where we created an interactive canvas you could collaboratively draw on with the rest of the world!
1. [Building Real-Time Web Apps with SignalR](https://www.youtube.com/watch?v=k5rdhYj6TB8)
2. [Connecting a Web App to SignalR](https://www.youtube.com/watch?v=c0zmYjQ8KWA)
3. [Creating a Real-Time Web Canvas](https://www.youtube.com/watch?v=hgq1CYEJg_Q)
You can see some of the other content I have planned outside this channel in the Microsoft Reactor (and even come to our in-person events) at the [Microsoft Reactor San Francisco Meetup Page](https://www.meetup.com/Microsoft-Reactor-San-Francisco/).
***
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Adding Unity Support - SignalR in Unity - Part 2](https://i.ytimg.com/vi/0mk-Kjab4as/mqdefault.jpg)




You can use the `CreateAssetMenuAttribute` to [create asset menus and more easily create new `ScriptableObject`s](https://docs.unity3d.com/ScriptReference/CreateAssetMenuAttribute.html).
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using Scriptable Objects in Unity](https://i.ytimg.com/vi/2P4oPtU2Rtk/mqdefault.jpg)


: Multiline strings expand the normal textbox a fixed number of vertical lines. This is less flexible than a `TextArea` but can still be useful in some situations.
* [`TextArea`](https://docs.unity3d.com/ScriptReference/TextAreaAttribute.html): Text Areas span between a minimum and maximum number of lines and - unlike a `Multiline` attribute - they will add scrollbars if the text exceeds the maximum number of lines. Additionally the `TextArea` spans the entire width of the Inspector giving more room to type.
The JSON.NET documentation is available here: https://www.newtonsoft.com/json/help/html/Introduction.htm
***
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u An Intro to Json Serialization and Deserialization in Unity](https://i.ytimg.com/vi/3F4HjM_5hZY/mqdefault.jpg)