Closed momintlh closed 1 month ago
Removed GetStateFloat in Player class, because there already is GetStateDict
I don't seem to understand how Float and Dict are related 😅
Removed GetStateFloat in Player class, because there already is GetStateDict
I don't seem to understand how Float and Dict are related 😅
Both functions are doing the same thing, if you check the code GetFloatDict
was only for Dictionary<string, float>
The other function has generic return type, so it supports that type as well.
Here's a list of functions which I think might need to be private:
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L288
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L302
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L771
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L925
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L1248
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L1300
- https://github.com/asadm/playroom-unity/blob/647af7bdf0b97cbcbc1a38b849c5b589f65fe7b4/Assets/PlayroomKit/PlayroomKit.cs#L1335
Can you check these out and confirm?
GetPlayer()
is quite useful with RPC, GetStateDict
is for dictionaries (these are not overloaded with GetState<>), and OnQuitWrapperCallback()
is inside the player class and it is being used inside the Playroom class so this needs to be public.
GetPlayer()
is quite useful with RPC
Okay that works.
GetStateDict
is for dictionaries (these are not overloaded with GetState<>)
Is there a way we can overload it somehow?
OnQuitWrapperCallback()
is inside the player class and it is being used inside the Playroom class so this needs to be public.
Is there a way we can hide such functions from end-user (developers) but not from between classes? Maybe there's another access method other than private and public?
GetStateFloat
in Player class, because there already isGetStateDict