Skip to content

Commit 24eb12d

Browse files
authored
Update ReadMe - Make LiveQuery Callbacks Unity centric
1 parent 7d7787e commit 24eb12d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,28 @@ separate these from the main code. To facilitate this we have included the _**Mo
267267
#### Example MoralisLiveQueryCallbacks Use
268268
```
269269
MoralisLiveQueryCallbacks<Hero> callbacks = new MoralisLiveQueryCallbacks<Hero>();
270-
callbacks.OnConnectedEvent += (() => { Console.WriteLine("Connection Established."); });
271-
callbacks.OnSubscribedEvent += ((requestId) => { Console.WriteLine($"Subscription {requestId} created."); });
272-
callbacks.OnUnsubscribedEvent += ((requestId) => { Console.WriteLine($"Unsubscribed from {requestId}."); });
270+
callbacks.OnConnectedEvent += (() => { Debug.Log("Connection Established."); });
271+
callbacks.OnSubscribedEvent += ((requestId) => { Debug.Log($"Subscription {requestId} created."); });
272+
callbacks.OnUnsubscribedEvent += ((requestId) => { Debug.Log($"Unsubscribed from {requestId}."); });
273273
callbacks.OnErrorEvent += ((ErrorMessage em) =>
274274
{
275-
Console.WriteLine($"ERROR: code: {em.code}, msg: {em.error}, requestId: {em.requestId}");
275+
Debug.Log($"ERROR: code: {em.code}, msg: {em.error}, requestId: {em.requestId}");
276276
});
277277
callbacks.OnCreateEvent += ((item, requestId) =>
278278
{
279-
Console.WriteLine($"Created hero: name: {item.Name}, level: {item.Level}, strength: {item.Strength} warcry: {item.Warcry}");
279+
Debug.Log($"Created hero: name: {item.Name}, level: {item.Level}, strength: {item.Strength} warcry: {item.Warcry}");
280280
});
281281
callbacks.OnUpdateEvent += ((item, requestId) =>
282282
{
283-
Console.WriteLine($"Updated hero: name: {item.Name}, level: {item.Level}, strength: {item.Strength} warcry: {item.Warcry}");
283+
Debug.Log($"Updated hero: name: {item.Name}, level: {item.Level}, strength: {item.Strength} warcry: {item.Warcry}");
284284
});
285285
callbacks.OnDeleteEvent += ((item, requestId) =>
286286
{
287-
Console.WriteLine($"Hero {item.Name} has been defeated and removed from the roll!");
287+
Debug.Log($"Hero {item.Name} has been defeated and removed from the roll!");
288288
});
289289
callbacks.OnGeneralMessageEvent += ((text) =>
290290
{
291-
Console.WriteLine($"Websocket message: {text}");
291+
Debug.Log($"Websocket message: {text}");
292292
});
293293
```
294294

0 commit comments

Comments
 (0)