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 #141

Closed
kristiandupont opened this issue Sep 8, 2015 · 64 comments
Closed

Unity Support #141

kristiandupont opened this issue Sep 8, 2015 · 64 comments
Assignees

Comments

@kristiandupont
Copy link
Contributor

kristiandupont commented Sep 8, 2015

No description provided.

@kristiandupont
Copy link
Contributor Author

During my last attempt, making unity work was successful once we switched to .net 3.5, but there were two issues: on windows, I had to run the build in the debugger for Unity to not crash. On OSX, trying to build for iOS, I couldn't make it move the project into xcode (xcode would crash). These issues should not be show stoppers but they are things to look into.

@timanglade timanglade changed the title Unity issues Unity Support May 9, 2016
@juggernate
Copy link

👍 Exciting! I love using Realm in my Swift projects and I would be very interested in using it for my Unity projects. Do you foresee many hurdles with Unity's IL2CPP?

@fealebenpae
Copy link
Member

I'm not sure anyone on the team here has enough experience with Unity to be able to say for certain whether we'd have any difficulties because of the IL to C++ translation, but I for one am excited to find out.

@dsgarage
Copy link

Great!!
Unity is .Net2.0 doing. Are you sure you want to support this version?

@ptatoChi
Copy link

pleaseeeeeeeeeeeeeeeeeeeeeeeeee unity support

@dasako
Copy link

dasako commented Aug 26, 2016

Does it support Unity yet?

@AndyDentFree
Copy link
Contributor

No, sorry, we do not yet have Unity support as of late August 2016.

@dasako
Copy link

dasako commented Aug 29, 2016

World is waiting for it...

@mgrider
Copy link

mgrider commented Sep 30, 2016

I would totally use this.

@sandolkakos
Copy link

sandolkakos commented Oct 26, 2016

I'd love to use Realm in my Unity projects too. Awaiting 👍

@kristiandupont
Copy link
Contributor Author

Unity developers, which platforms are you primarily aiming to target?

@favoyang
Copy link

By ordering: iOS, Android and web.

Cheers,

Favo

Co-Founder of
[LittleBigFun](https://link.nylas.com/link/ed2pdxrrb6kjpijanrdscl3vw/local-3fa
f0561-6900/0?redirect=http%3A%2F%2Fwww.littlebigfun.com&r=cmVwbHkrMDAwMWU5Y2U1
NThiNmViZDQ0ZTE1MTM0Nzg0MmRlNzFkZjAyNDdiNjc3ZDI3ODI2OTJjZjAwMDAwMDAxMTQyODRmZm
U5MmExNjljZTA2NDdmMDRkQHJlcGx5LmdpdGh1Yi5jb20=) - The Boy and Girl Indie Game
Studio.

![](https://link.nylas.com/open/ed2pdxrrb6kjpijanrdscl3vw/local-3faf0561-6900?
r=cmVwbHkrMDAwMWU5Y2U1NThiNmViZDQ0ZTE1MTM0Nzg0MmRlNzFkZjAyNDdiNjc3ZDI3ODI2OTJj
ZjAwMDAwMDAxMTQyODRmZmU5MmExNjljZTA2NDdmMDRkQHJlcGx5LmdpdGh1Yi5jb20=)

On 10月 26 2016, at 7:05 晚上, Kristian Dupont [email protected] wrote:

Unity developers, which platforms are you primarily aiming to target?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, [view it on GitHub](https://github.com/realm
/realm-dotnet/issues/141#issuecomment-256316078&r=cmVwbHkrMDAwMWU5Y2U1NThiNmVi
ZDQ0ZTE1MTM0Nzg0MmRlNzFkZjAyNDdiNjc3ZDI3ODI2OTJjZjAwMDAwMDAxMTQyODRmZmU5MmExNj
ljZTA2NDdmMDRkQHJlcGx5LmdpdGh1Yi5jb20=), or [mute the
thread](https://github.com/notifications/unsubscribe-auth
/AAHpzvRSUB8ndTQ0dLhmIq8opu_Atiwdks5q3zP-gaJpZM4F5fgv&r=cmVwbHkrMDAwMWU5Y2U1NT
hiNmViZDQ0ZTE1MTM0Nzg0MmRlNzFkZjAyNDdiNjc3ZDI3ODI2OTJjZjAwMDAwMDAxMTQyODRmZmU5
MmExNjljZTA2NDdmMDRkQHJlcGx5LmdpdGh1Yi5jb20=).![](https://github.com/notificat
ions/beacon/AAHpzuw6nEZx5NrD6iRnwmbYQXPjMsnzks5q3zP-gaJpZM4F5fgv.gif)

@dasako
Copy link

dasako commented Oct 27, 2016

iOS, Android and Nintendo Switch.

@negue
Copy link

negue commented Oct 27, 2016

Android, UWP and iOS

@Raydekk
Copy link

Raydekk commented Oct 27, 2016

Android and iOS

@johnpudd
Copy link

iOS and Android here.

On Thursday, 27 October 2016, negue [email protected] wrote:

Android, UWP and iOS


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#141 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFuy0OuAJbDpDzPMyPEGyrLP9mIJ-Y4pks5q4E0DgaJpZM4F5fgv
.

Kind regards

John Puddifoot
Founder, Eastpoint Software Limited
E: [email protected]
T: +44 (0) 1223 690 164
M: +44 (0) 7494 489 954
www.eastpoint.co.uk https://www.eastpoint.co.uk/
https://www.eastpoint.co.uk/

@noughts
Copy link

noughts commented Oct 28, 2016

Android and iOS

@mgrider
Copy link

mgrider commented Oct 28, 2016

iOS, Android, Windows/PC, various consoles. (But you don't want to support consoles.)

@sandolkakos
Copy link

Android, iOS, Web and Standalone (Windows, MacOSX, Linux).

@phillipeaam
Copy link

Android, iOS, Web and Standalone (Windows, MacOSX, Linux). ²³!

@JeffersonFerreira
Copy link

UWP and Android :)

@tallesborges
Copy link

Android and iOS

@ryangullotti
Copy link

iOS, Android, Windows/PC

@8beat0405
Copy link

We're really waiting for this.
Please update your working progress so we can choose what to use for our next project.
Thank you.

@sandolkakos
Copy link

@kristiandupont
Any news about Unity Support? My team will start a new project in the next months where we would like to use realm :)

@kristiandupont
Copy link
Contributor Author

Sorry, there are no news to report yet. We have other issues that are currently higher priority. We will keep this thread updated when we start looking into Unity.

@sandolkakos
Copy link

Thanks for keeping us informed.

@burcsade
Copy link

Crossing fingers here, developing for iOS and Android.

@mahdisml
Copy link

mahdisml commented Apr 28, 2019

i think we can use Realm .net Database in Unity3d 2019.1 version ! :)
Because Unity 2019.1 Support .NET standard 2

@XDarinor
Copy link

Unity 2019 supports .NET Standard 2. But Realm still need to wrap the native c++ core to run? This means that can be of course used on Android e iOS, but I think it will not work on Switch and other gaming platform. Even if Playstation 4 runs on Linux, the buildchain can be different. The only plausible gaming platform that can be supported it's XBOX One, as it uses UWP as a base to work. Anyone have experience using Realm on a gaming platform different from desktop PC and mobile devices?

@CrandellWS
Copy link

well let me get notified on this I guess

@nirinchev
Copy link
Member

@XDarinor that is correct - when we decide to ship Unity support, initially we'll roll it out for platforms we currently support (iOS, Android, Windows, macOS, and Linux). Obviously we can extend support to other platforms but that will depend a lot on customer and community interest.

@sandolkakos
Copy link

@XDarinor, do you have a prevision to give us about when could we start using Realm on Unity?
The biggest part of the Unity Developers are developing for Android, iOS and Windows, so release it and let all of us be happy. Later you guys can release for other platforms. 😝

@hanniiel
Copy link

hanniiel commented Aug 1, 2019

You got my interest :3, I really wanna use Realm (currenly using LiteDB) but also MogoDB mobil version is coming so....

@darkwater84
Copy link

@nirinchev can you give us a page to make a petition?

@hanniiel
Copy link

https://www.mongodb.com/realm what about this??

@chrisk414
Copy link

Hi,
I just learned about Realm and very excited to try but I found myself disappointing soon after.
Realm advertises big on mobile as the best solution, yet it doesn't support Unity. What gives?
Unity is probably the most popular mobile development platform and it's still not supported for 4 years?
Is this something you will never do anything about it? If so, I would not hold my breath any further.

Last a couple of days, I spent lots of time trying to make it work and all my efforts failed.
However, I made some progress. This is the current state.

There are two problems. 1.

  1. Fody will not work on Unity: After pulling lots of hair, I determined that Fody on Unity will not work, therefore I had to create an external DLL and bring it into Unity.

  2. Unity will freeze when the assemblies reload: Bring it into Unity will work for the first run, however, clicking on "Play" the second time will freeze Unity.
    This is because Unity will try to reload the assemblies but the DLL(I believe it's realm-wrapper.dll) won't reload. I think we need to find a way to reload DLL or make the DLL stay resident so that it's unaffected by the assembly reload.

I really hope Realm support Unity soon, if not at least resolve an issue about the freeze. This will at least get us going while waiting for the better support.

Thanks.

@chrisk414
Copy link

@nirinchev

Yes, there is - we are in the process of migrating our assemblies to .NET standard. Then, Unity will need to add support for that (which they promised they'll do).

What they promised they'll do is fulfilled. What's the status on this? Is there a person who is actively looking into this? I'll have to figure out if I'll adopt Realm.

The current problem is that Realm.dll use P/Invoke calls to realm-wrapper.dll and it makes Unity to freeze when trying to unload realm-wrapper.dll.

A bright side is that it runs fine for the first run, and reading (not writing) from realm doesn't seem to call realm-wrapper.dll and it doesn't cause the freeze.

Until Realm supports Unity officially, I have to figure out a workaround. I think there are two workarounds.

  1. Is there a way to disable the automatic sync? I would like to find out if there is a way to manually sync. I'm aware that when I do the manual sync, I need to restart Unity.

  2. Just use a local realm file for Unity and create a separate daemon that syncs between the local realm file and the realm server. Is it possible to make such a daemon that can sync only changed objects?

I guess I prefer workaround #2, but I would like to know the answer to #1.

Please help make this possible. I'm sure there are tons of Unity users dying to use Realm.

Thanks.

@nirinchev
Copy link
Member

We don't have anyone currently working on unity support, but is something that we're evaluating. You can keep an eye on the roadmap for updates.

@chrisk414
Copy link

Well, I expected some answers to my question above but the answer is flat. hmm..

Anyway, let me ask you again.

Right now, I can only use Realm as a local db and I would like to know if there is a create a daemon that syncs between the local and online Realm.

In theory it's possible but I find that accessing local Realm while it's being used by other app creates freeze. I can't even edit using Realm Studio when an application uses it. I believe it doesn't mean to be designed like that. If it is, I'm very disappointed with the current limitation and it's almost unusable.
You should fix this freeze at least so that I can do something with it until the full Unity support is in.

Oh well..
According to the roadmap, additional platform support will start toward the end of next year.
That's pretty depressing to know, specially this topic has been opened for 4 years and nothing has been done on it.

Now that you have MongoDB backings, perhaps you should hire Unity specialists now instead of waiting for another year to get started.

I don't think you can say you are big on mobile without Unity support these days.
My two cents.

@nirinchev
Copy link
Member

nirinchev commented Oct 28, 2019

If the issues with freezing you describe occur in a Unity project, then there's nothing we can do about it until we have official Unity support.

Regarding official Unity support, as I said, no one is working on it at the moment. We do have plans to expand the platforms we support, but we're not in a position to commit to a public timeframe. If you have a critical deadline by which you need to be able to run Realm in a Unity app, please reach out to your account executive or the sales team to describe your project requirements and deadlines. They may be able to give you a more specific roadmap.

@chrisk414
Copy link

Ok, I get that you don't have a specific plan to support Unity now. And I'm really hoping that you would sooner than later.

I asked the question a couple of times already and let me ask you this question once again. I filed a support ticket but I was directed to ask on the forum. And it keeps going into the drain.

While an application is accessing local Realm, another application cannot write to the same realm.
This includes Realm Studio. It is not related to Unity at all but I need to figure out the workaround.

What I'm trying to do is to create a daemon that syncs between a local Realm and online Realm while the local realm is being accessed by an application.
This way, I can make Unity to read/write to local db while it gets synchronized to the online Realm.

I'm sure you didn't design Realm so that only one application can access it. If so, it has a serious design flaw as you cannot edit it from Realm Studio while some application is using it.

Please help answer the question above and I'll appreciate it. And let me know if the thread-safe version will fix it if it's the current limitation.

Thanks.

@fealebenpae
Copy link
Member

Synchronized realm files can only be opened by one process at a time, that's why you can't open a synchronized realm with another application or with Realm Studio. That's only possible for realms opened using a RealmConfiguration, not FullSyncConfiguration or QueryBasedSyncConfiguration. If you can share a repro project or at least code samples of a RealmConfiguration realm not being able to be shared by two processes I'll try and help you out.

@chrisk414
Copy link

Thanks, it's good to know that local Realm(ReamConfiguration) is "process" safe.
I'll do some more testings and let you know what I find.
Cheers!

@Avatarchik
Copy link

Hi!Did anyone get to use this database?

@ianpward
Copy link

ianpward commented May 5, 2021

Good news everyone! We have released Beta build support for Unity for our .NET SDK - take a look at an example blogpost here - https://developer.mongodb.com/how-to/getting-started-realm-sdk-unity/

We still have a bunch of things to do over the next quarter while we get our Unity SDK to GA but feel free to take it for a spin and let us know what you think! Additionally, if you are building a game and have local storage requirements we'd love to talk to you; our roadmap is still getting defined and we want to serve the gaming community with the best local database out there. If you are interested in speaking with us please drop me a line at [email protected] for a quick chat

@sandolkakos
Copy link

Good news everyone! We have released Beta build support for Unity for our .NET SDK - take a look at an example blogpost here - https://developer.mongodb.com/how-to/getting-started-realm-sdk-unity/

We still have a bunch of things to do over the next quarter while we get our Unity SDK to GA but feel free to take it for a spin and let us know what you think! Additionally, if you are building a game and have local storage requirements we'd love to talk to you; our roadmap is still getting defined and we want to serve the gaming community with the best local database out there. If you are interested in speaking with us please drop me a line at [email protected] for a quick chat

That is a very nice announcement. I was waiting for it for almost 5 years, and I'm gonna definitely give it a check over the next weekend.

@nirinchev
Copy link
Member

For those willing to take it for a spin, be sure to get the package from the latest beta release as that addresses a whole lot of rough edges.

@nirinchev
Copy link
Member

I'm incredibly excited to announce that the Unity SDK is now GA. We'll have a bunch of tutorials and sample apps in the pipeline, but for now, take a look at the docs for a quick getting started guide and browse through the examples at the end of the page if you're looking for inspiration or something more hands-on.

And as always, if you are facing difficulties or have suggestions how to improve the SDK, do let us know - we can't wait to see all the amazing games you'll build with Realm and Unity!

@ianpward
Copy link

To add on to what @nirinchev said - we'd love to hear about your game and what kind of requirements you have around data persistence. Realm is just getting started in the game development space and our roadmap is adapting to handle these requests. Drop us an email at [email protected] and we can set up a time to talk about your game and answer any questions you might have - looking forward to speaking with you!

@ianpward
Copy link

Hey All - our Unity tutorial is live - https://docs.mongodb.com/realm/tutorial/unity/

We have both sync and non-sync versions of the walkthrough - let us know if you have any feedback and happy coding!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests