Looking through walls (Unity-based C#)
So if you can run unity-based code inside Rust, you can do some neat things, like in-game menus.
This code snippet for example allows to quickly analyze buildings to detect weak points.
Unity C# Code
What it looks like
Before:

After:

This code snippet for example allows to quickly analyze buildings to detect weak points.
Unity C# Code
Code:
object[] allObjects = Resources.FindObjectsOfTypeAll(typeof(GameObject));
ArrayList all = new ArrayList();
foreach (object thisObject in allObjects)
{
if (((GameObject)thisObject).activeInHierarchy)
{
GameObject obj = (GameObject)thisObject;
if (obj.name == "WoodWall(Clone)" || obj.name == "WoodDoorFrame(Clone)" || obj.name == "WoodCeiling(Clone)")
{
all.Add(obj);
obj.SetActive(false);
}
}
}
allHidden = all.ToArray(typeof(GameObject)) as GameObject[];
Before:

After:

