Skip to content
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

Unity Support #2824

Open
somniumwave opened this issue Oct 18, 2022 · 8 comments
Open

Unity Support #2824

somniumwave opened this issue Oct 18, 2022 · 8 comments
Labels
discussion Initial issue state - proposed but not yet accepted

Comments

@somniumwave
Copy link

somniumwave commented Oct 18, 2022

Hello,

I would like to discuss a way for Unity to interface directly with the N3 blockchain, i.e. invoke contracts from within. Currently there is a Unity SDK package that you can import and use pretty easily to get stuff like NFTs to show up in game, etc. But it's for EVM. Would love if we could make something like this work for NEO. I think it would make it really helpful for others that wanna build games that interface with N3. Please see link below for the SDK reference.

Chainsafe SDK - https://gaming.chainsafe.io/

@somniumwave somniumwave added the discussion Initial issue state - proposed but not yet accepted label Oct 18, 2022
@devhawk
Copy link
Contributor

devhawk commented Oct 18, 2022

Info on .NET support in Unity: https://docs.unity3d.com/Manual/overview-of-dot-net-in-unity.html

As per that doc, Unity recommends targeting .NET Standard 2.1. It appears there are additional limitations that stem from Unity execution environment (Mono or IL2CPP)

@devhawk
Copy link
Contributor

devhawk commented Oct 18, 2022

This appears related to #1865, where the refactored domain assembly (which I call "nucleus" but I am in no way married to that term) is unity compatible. @Liaojinghui proposed #2547, which was closed as a dupe of #1865.

This also appears related to neo-project/neo-modules#749 which asks for a RpcClient that is compatible with .NET MAUI. I suspect that if we generate a "nucleus" assembly that is Unity compatible, it would be straightforward to build a RpcClient on top of it that was both Unity and MAUI compatible.

cc @erikzhang @shargon @gsmachado - Can we get some feedback on this?

@gsmachado
Copy link
Contributor

gsmachado commented Oct 20, 2022

Well, as I expressed a couple of times, I'm a big fan of decoupling things (#1865) IF there's a reason for doing it.

IMHO, at this stage, it's desirable to decouple the code. It becomes way easier to make portions of Neo to be compatible with MAUI and Unity. We had some people asking for this in the past (including neo-project/neo-modules#749), which justifies the decoupling (e.g., #1865). In other words: there's demand.

So, I'm on-board. 😄

@erikzhang @shargon: what do you think about this?

@shargon
Copy link
Member

shargon commented Oct 20, 2022

It appears there are additional limitations that stem from Unity execution environment (Mono or IL2CPP)

Can we know what are incompatible?

@devhawk
Copy link
Contributor

devhawk commented Dec 14, 2022

This was closed by #499

Ignore this comment.

@shargon
Copy link
Member

shargon commented Jan 2, 2023

@devhawk by #499?

@devhawk
Copy link
Contributor

devhawk commented Jan 2, 2023

@devhawk by #499?

I'm sorry, this issue should NOT be closed. neo-project/neo-vm#499 was the first step towards unity compatibility. But there are two additional steps needed:

  • Break Neo.dll into two parts: the "Nucleus" and the stuff needed to run a full node. "Nucleus" will have the core domain model and will target .NET Standard 2.1 + .NET 6 just as Neo.VM does.
  • Update RpcClient to depend on the new neo nucleus assembly so that it can target .NET standard 2.1 (required for unity support)

@cschuchardt88
Copy link
Member

neo core is written in dotnet standard 2.1 now. Plugins however are not written in standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

No branches or pull requests

5 participants