private void OnAbsorbedBy(object data) { if ((Object)prefabId.Get() != (Object)null) { prefabId.Get().Unsubscribe(-1940207677, OnAbsorbedBy); } GameObject gameObject = (GameObject)data; KPrefabID component = gameObject.GetComponent <KPrefabID>(); component.Subscribe(-1940207677, OnAbsorbedBy); prefabId.Set(component); }
public MessageTarget(KPrefabID prefab_id) { prefabId.Set(prefab_id); position = prefab_id.transform.GetPosition(); name = "Unknown"; KSelectable component = prefab_id.GetComponent <KSelectable>(); if ((Object)component != (Object)null) { name = component.GetName(); } prefab_id.Subscribe(-1940207677, OnAbsorbedBy); }