RobProductions / OpenEOS

A lightweight & open-source port of the Epic Online Services (EOS) SDK in Unity Package format, with simple extensions that provide a smoother integration within Unity.
MIT License
9 stars 1 forks source link

Update to newest EOS SDK version #11

Closed georg-walkingtreegames closed 4 months ago

georg-walkingtreegames commented 4 months ago

Hi,

first of all: Great work you've done, thanks a lot! I had to integrate the EOS SDK on short notice, and using OpenEOS was really smooth and I actually like your hand-off approach compared to the https://github.com/PlayEveryWare/eos_plugin_for_unity.

It would have been nice to have some simple EOSManger class that you can copy&paste to make the start even smoother, but in the end with the helper methods, it's still quite simple.

Now to the topic of this issue: Are there any plans to update to the newest EOS SDK version? Do you think that would be a complicated thing to do? If you had some pointers, I could create a PR to get this topic started.

RobProductions commented 4 months ago

Thanks for trying it out! I didn't have plans to update it any time soon but it should be really simple to do so. You just need to download the official SDK from the EGS dev portal and place the correct files/folders (the .dlls that package the C# version of the SDK) into this folder. Assuming the function calls/library names are all the same it should just work out of the box.

PR would be appreciated or I can update it myself if you'd like. I thought about creating a tool to automatically import the right files in but it seemed like overkill at the time; that's not off the table either though.

Lastly, an EOSManager could definitely be added in the future but the original intent was definitely for people to build their own as each game might have different needs. For example, one game might want to run the EOS login immediately but another may wait until the main menu, etc. And for security it might sense for some people to hide their secret keys in const variables as opposed to exposing them in the inspector. I could use my usual manager code as a base for this new feature but would still strongly recommend users to interface with EOSCore/EOSAuth for better control as that was supposed to be the differing factor from PlayEveryWhere's plugin. Let me know what you think though as I'm happy to hear opinions on that :)

georg-walkingtreegames commented 4 months ago

Thanks for getting back on this so quickly!

I'll try to create a PR with the newest EOS SDK.

Regarding the EOSManager: I would not add the class to this package, but rather have a implementation that you can start with handling the very basic cases. https://github.com/rlabrecque/Steamworks.NET does the same with its SteamManager and I find that approach really handy.

RobProductions commented 4 months ago

Actually let me see if I can update EOS SDK myself and maybe figure out what steps it needs so that it can potentially be automated with a script. Would want to validate the DLLs anyways I think, so no need to worry about a PR :)

As for the Manager, you mean to just include an example script as a starting place for people to use? If so, where would you want it hosted? In the Readme? Or a separate example repo?

RobProductions commented 4 months ago

Okay I tried my hand at automating the update but my Python skills are not good enough to get all the way there lol. I left my scripting attempt in a new "Tools" folder and copied the rest manually, but there was an issue:

image

Seems some sort of incompatibility exists within the new Source/Overrides folder as a few files there can't convert the byte data to the expected format (ArraySegment). I'm unsure if I solved this before on an earlier version but this whole Overrides folder might be new to the SDK since last time so could be a few things:

  1. The new SDK uses a .NET version higher than Unity 2020 supports (I tried both .NET 4 and Standard 2.0) or
  2. They just didn't test the latest update in Unity and this is now something that always breaks or
  3. Something else I'm not seeing

I will think on it a bit more but the only solution I can think of now without trying newer Unity versions is to just manually edit these 4 places that have an error to do the conversion properly. I don't think that'll have any consequences for the SDK; it's just to get the source code to compile for easy viewing, but still something seems wrong about having to do that. Appreciate any suggestions there :)

EDIT: And for reference, it seems PlayEveryWhere's plugin has only updated to 1.16.1 whereas I attempted 1.16.3. On their repo, they don't have the Overrides folder so either it was not included in 1.16.1 or was deleted when imported

RobProductions commented 4 months ago

One last update on this: I double checked the older version of the SDK and it turns out that these new problem files are indeed introduced in 1.16.3. For now, I think updating to 1.16.1 is good enough since it's at least better than the 1.15.x it was targeting before so that's what I did instead of going to the absolute latest version.

That update is now pushed out to main as a new Release tag labeled 2.0.0! I figured this was most important so I wanted to get it out there first in case you'd like to use the updated SDK version. For future SDK updates, if those files are still an issue we can worry about it then, but it's also possible that Epic made a mistake in 1.16.3 specifically and will correct it in new versions.

And for the EOS Manager, I've made a new Issue for discussion on that ( #14 ) so please feel free to let me know your thoughts over there! I did see your other issue as well and I will research it soon as I'm stretched a bit thin atm, appreciate your patience on that :)