Section for Programmers¶
To receive important LiveOps events, such as new Offer activate/deactivate, A/B test started, Segment changed, etc... follow the next steps:
- Create a new class inherited from interface
ISmartObjectsEvents
. You can use the example we provideSmartObjectsEventsExample
. - Register SmartObjects listener
ExternalEvents.RegisterSmartObjectsListener(new SmartObjectsEventsExample());
. If you are using our Store, you should also register LiveOps Store listenerExternalEvents.RegisterLiveOpsListener(new LiveOpsStoreEventsExample());
. - Whenever LiveOps package invokes an important event, the associated method of
ISmartObjectsEvents
is called. - Read the comments in the SmartObjectsEventsExample.cs file to understand the meaning of each method.
void OnSmartObjectsInitialized();
is the starting point. Don't try to call any method of SmartObjects package before it's called.