public static void TriggerEvent(EventType type)
{
if (!Application.isPlaying)
{
FindAllModifiers();
}
GraphModifier root = GraphModifier.root;
switch (type)
{
case EventType.PostScan:
while (root != null)
{
root.OnPostScan();
root = root.next;
}
return;
case EventType.PreScan:
while (root != null)
{
root.OnPreScan();
root = root.next;
}
return;
case EventType.LatePostScan:
while (root != null)
{
root.OnLatePostScan();
root = root.next;
}
return;
case EventType.PreUpdate:
while (root != null)
{
root.OnGraphsPreUpdate();
root = root.next;
}
return;
case EventType.PostUpdate:
while (root != null)
{
root.OnGraphsPostUpdate();
root = root.next;
}
break;
case EventType.PostCacheLoad:
while (root != null)
{
root.OnPostCacheLoad();
root = root.next;
}
break;
}
}