-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor PlayroomKit #40
Comments
Yeah a class for Callbacks (kind of like a CallbackFactory or something) might be cool. Also, can use Macros for repetitive code, like the |
We need better error handling to distinguish between JS errors and Unity errors. Inspired by #38 |
The current RPC implementation is unstable. Using setState to manage rpcEventNames can cause race conditions under high loads, and may not guarantee delivery (specially first delivery, as there will be network delay between setState and the RPC delivery) This needs to be reliably managed. A way to do this is by delivering metadata alongside each RPC call, or use a predictable key generator to generate function IDs. Reference: |
We also should separate our header and definition files, and give the project better structure and abstraction. |
Thoughts on filestructure:
|
Our base class is a static class with static members, inheritance and overriding isn't going to work with that. |
Maybe create a common interface on top? |
We need to decouple the NetworkManager from the PlayroomKit API. That will enable us to create an implementation for WebGL vs mobile vs desktop |
PlayroomKit interface is yet to be made @momintlh |
Base Interface / abstract class? Yes |
We will now track this in the project, in the form of separate tasks. |
This isn't a feature/bug issue but rather an issue for refactoring/cleaning the SDK. As we are using callbacks in many parts of the C# wrapper, it is getting quite messy, we have the following pattern in multiple parts:
And to use the function we usually do something like this:
or
What we can do is to make a custom class for handling callbacks this will simplify the current codebase and make it easier for future updates/fixes.
The text was updated successfully, but these errors were encountered: