Search code examples
unity-game-enginesfml

Can we combine SFML with Unity? If yes then how?


I just started C++ lessons not so long ago because I am interested in game development. Obviously I am nowhere near creating my own game yet but I was reading some guides on game development and it was talking about Unity and how it makes game development a lot easier than having to code 100% of the game.

However, I also watched some tutorials on youtube regarding SFML which can also be used for game developing, what are the differences? and can you use both at the same time?

I have already started learning about SFML but Unity seems so much simpler to use.

Thanks in advance.


Solution

  • In theory yes, but it's not practical, so the real answer is no.

    SFML provides access to basic APIs (OpenGL, OpenAL, OS APIs, FreeType 2, etc) which can be used to build complex applications on top, for example like an engine more in the direction of Unity (e.g. xygine, Nero Game Engine).

    But since Unity already provides access to all the things SFML would provide, there's really no reason in trying to integrate SFML into Unity. Similar to how it wouldn't make sense to integrate the Unreal Engine into Unity.

    If you really want to do it, you'd approach it similar to how @Programmer described it in the comments.