public static Omnity Attach(Camera camObj) { GameObject go = camObj.gameObject; Omnity omi = go.AddComponent <Omnity>(); // This bit is needed to get the screen to actually update properly; without it we don't see anything omi.ConfigLoaded += (oc) => { oc.forceRefresh = true; }; return(omi); }
public static void Detach(Camera camObj, Omnity existingOmnity) { existingOmnity.UnloadOmnity(); Object.Destroy(existingOmnity); }