Hi, I want to check the entities on my server. Specifically I want to check all minicopters, and if they have a wooden board child entity I want to do things. For now all I want to do is Puts("Minicopter Licence Found")
Checking all minis
On another note, how can I see if a class has a function? For instance I suspect what I want has GameObject.FindObjectOfType but not sure what type to look for? And how to see if it has a child? Or if it has children, how to see if it has a small wooden board prefab?
foreach (var mini in BaseNetworkable.serverEntities.OfType<MiniCopter>())
{
foreach (var child in mini.children)
{
if (child is Signage)
{
Puts("Found a sign on a mini");
// Stop looping the children and check next mini
break;
}
}
}