Uploaded March 2020 | Updated November 2026, 2 hours ago
Continuing our development of the Sand Table prototype project we're going to add gates. We'll build two components for this. The first is a script that can procedurally place any number of gates in a circle, the second is able to detect and move the position of gates after they have been passed through.
These gates should allow us to implement a fairly simple way to end the game - if you hit a gate you lose. By being able to procedurally modify the size and number of gates we should be able to more easily find out what a good number of gates might be in the final project and what they look like.
I should also mention, I'm figuring this out as I go. I don't know what will work and what won't. We'll be poking at most of the Unity stack for the first part and learning electronics as we go (they're not something I'm that familiar with). Debuggers, random tangents and project redesigns await.
Check out Line Wobbler by Robin Baumgarten, a big inspiration behind this project, a 1-D dungeon crawler made with an LED strip. wobblylabs.com/projects/wobbler
We have a Discord Server! You're welcome to join and talk development, share your projects etc: discord.gg/hU5Kq2u
Continuing our development of the Sand Table prototype project we're going to add gates. We'll build two components for this. The first is a script that can procedurally place any number of gates in a circle, the second is able to detect and move the position of gates after they have been passed through.
These gates should allow us to implement a fairly simple way to end the game - if you hit a gate you lose. By being able to procedurally modify the size and number of gates we should be able to more easily find out what a good number of gates might be in the final project and what they look like.
I should also mention, I'm figuring this out as I go. I don't know what will work and what won't. We'll be poking at most of the Unity stack for the first part and learning electronics as we go (they're not something I'm that familiar with). Debuggers, random tangents and project redesigns await.
Check out Line Wobbler by Robin Baumgarten, a big inspiration behind this project, a 1-D dungeon crawler made with an LED strip. wobblylabs.com/projects/wobbler
We have a Discord Server! You're welcome to join and talk development, share your projects etc: discord.gg/hU5Kq2u

).GetAwaiter().GetResult();
```
Find a `Camera` object in the current scene:
```csharp
cameraObject = await CSharpScript.EvaluateAsync[GameObject](GameObject.FindObjectsOfType[Camera]().First().gameObject,
ScriptOptions.Default.WithImports( // Import namespaces to simplify scripts
System,
System.Collections.Generic,
System.Linq,
UnityEngine
).AddReferences( // Include additional assemblies
typeof(System.Linq.Enumerable).Assembly,
typeof(UnityEngine.Transform).Assembly
));
```
The Roslyn Scripting API is documented on GitHub: https://github.com/dotnet/roslyn/wiki/Scripting-API-Samples
You can find the Nuget package here: https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Runtime C# Scripting - Embedding the .NET Roslyn Compiler in Unity](https://i.ytimg.com/vi/YtzYkoWhrTk/mqdefault.jpg)

 and [Nuget](https://www.nuget.org/packages/TrieNet/). You can find more documentation and learn about its other features here: https://github.com/gmamaladze/trienet
If you want to learn more about how Tries work as a data structure you can learn more about that on Wikipedia: https://en.wikipedia.org/wiki/Trie
If youre interested in how to build a `Trie` from scratch weve done that in an earlier video you can find here: https://www.youtube.com/watch?v=4nmVXKu6e_Q
For more information about the Mermaid diagrams I use at the start of this video, check out [my video on Mermaid JS](https://www.youtube.com/watch?v=7_2IroEs6Is). Recently support for these diagrams was even [added to GitHub](https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams).
***
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Trie, Trie Again - A String Search Data Structure](https://i.ytimg.com/vi/ZgZXW_V-2lo/mqdefault.jpg)



![Using PowerShell to Create a Symbolic Link on Windows
Symbolic Links allow you to create a reference in your file system to another file or directory. This allows you to reference the same file in multiple places without having to physically copy it into each place. This can save storage space and also allows a single change to the file to be seen by every location that links to it as well.
In this video well be taking a look at how to create these Symbolic Links from PowerShell using a version of the `New-Item` commandlet. In order to take advantage of this youll need to be running in an Administrator PowerShell or you may see the New-Item : Administrator privilege required for this operation error. This solution is able to create symbolic links between files or directories and also will detect if the target item you are creating the link to exists or not before generating the link.
In order to create the symlink in PowerShell youll run this command:
```ps1
New-Item -ItemType SymbolicLink -Path [path] -Target [target]
```
This will create a new Item at the provided path that represents a link to the target file or directory.
If you prefer Command Prompt you can learn how to make a symbolic link in Command Prompt here: https://youtu.be/w2gxWTOPw7U
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using PowerShell to Create a Symbolic Link on Windows](https://i.ytimg.com/vi/_VnONfOgP8M/mqdefault.jpg)


.
When used in a function or property which returns an `IEnumerable`, yield will provide two features. You may `return` the next value in the set or `break` out of the loop - effectively terminating the set. Values `return`ed from a `yield` keyword are composed into the enumerable set as your code evaluates. Yield statements are evaluated lazily (meaning the function generating the enumerable object is not generated completely before the first element is returned), this means that after returning with `yield` the code in the function will continue from the point it returned from including preserving the state (such as local variable values).
Using these concepts we can create a function which returns all positive integers between 1 and a max value.
```csharp
// Note: youll need to replace the IEnumerable˂int˃ with correct syntax as well as the ˃= symbol
public static IEnumerable˂int˃ PositiveInts(int max) {
int i = 1;
while(true) {
yield return i++;
if (i ˃= max) {
yield break;
}
}
}
```
* `yield return`: returns the next value in an `IEnumerable`.
* `yield break`: marks the end of the `IEnumerable`.
More information about using `yield` with some other examples is available here: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/yield
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using C#s Yield Keyword](https://i.ytimg.com/vi/bsZjfuTrPSA/mqdefault.jpg)