private static void Prefix(ref ModuleItemHolderBeam __instance) { if (ItemHolderQuads.ContainsKey(__instance)) { m_BeamQuadPrefab.SetValue(__instance, ItemHolderQuads[__instance]); ItemHolderQuads.Remove(__instance); } }
private static void Prefix(ref ModuleItemHolderBeam __instance) { var prefab = (GameObject)m_BeamQuadPrefab.GetValue(__instance); if (!ItemHolderQuads.ContainsKey(__instance)) { ItemHolderQuads.Add(__instance, prefab); } if (displayHolderBeamsBool) { if (ItemHolderQuads[__instance] != prefab) { m_BeamQuadPrefab.SetValue(__instance, ItemHolderQuads[__instance]); } } else if (prefab != null) { m_BeamQuadPrefab.SetValue(__instance, null); } }