public static void OnDisplayChanged(Ex.Typed comp, ExEntityLink link) { TypedHook hook = link.Require <TypedHook>(); if (hook.type == null || hook.type != comp.type) { link.gameObject.name = $"{comp.type}:{link.id}"; hook.type = comp.type; } }
public static void OnDisplayRemoved(Ex.Typed display, ExEntityLink link) { TypedHook hook = link.GetComponent <TypedHook>(); if (hook != null) { if (hook.type != null) { link.gameObject.name = "" + link.id; } DisplayHook.Destroy(hook); } }