Skip to content

Instantly share code, notes, and snippets.

@gmodecorp
Created December 22, 2014 13:06
Show Gist options
  • Save gmodecorp/94c32dbd1a142d48acb6 to your computer and use it in GitHub Desktop.
Save gmodecorp/94c32dbd1a142d48acb6 to your computer and use it in GitHub Desktop.
public static void RemoveRoutine(MyLib.MonoBehaviour behaviour, string methodName)
{
MyLib.BehaviourData bdata;
if (behaviourDict.TryGetValue(behaviour, out bdata))
{
LinkedListNode<MyLib.Coroutine> node = bdata.routineList.First;
while (node != null)
{
var oldNode = node;
node = node.Next;
if (oldNode.Value.methodName == methodName)
{
bdata.routineList.Remove(oldNode);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment