Nvm, got a better option
Get all monuments
Discussion in 'Rust Development' started by Riddle, Aug 1, 2018.
-
take a look into this, the foreach loop:
Code:// ConVar.World [ClientVar] public static void monuments(ConsoleSystem.Arg arg) { if (!global::TerrainMeta.Path) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("name"); textTable.AddColumn("pos"); foreach (global::MonumentInfo current in global::TerrainMeta.Path.Monuments) { textTable.AddRow(new string[] { current.Type.ToString(), current.name, current.transform.position.ToString() }); } arg.ReplyWith(textTable.ToString()); }
-
You can use that, cowboy
foreach (var monument in UnityEngine.Object.FindObjectsOfType<MonumentInfo>())
{
// Garbage here
}