Skip to content

Instantly share code, notes, and snippets.

@boformer
Created May 6, 2019 21:36
Show Gist options
  • Select an option

  • Save boformer/100f601793fe78b732caaab1e6503a69 to your computer and use it in GitHub Desktop.

Select an option

Save boformer/100f601793fe78b732caaab1e6503a69 to your computer and use it in GitHub Desktop.
var netManager = NetManager.instance;
for (ushort n = 0; n < NetManager.MAX_NODE_COUNT; n++)
{
if ((netManager.m_nodes.m_buffer[n].m_flags & NetNode.Flags.Created) != NetNode.Flags.None)
{
var segmentCount = netManager.m_nodes.m_buffer[n].CountSegments();
if (segmentCount == 0)
{
Debug.Log("Releasing ghost node " + n);
netManager.ReleaseNode(n);
}
}
}
@boformer

Copy link
Copy Markdown
Author

Better start from scratch with image overlay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment