is programming for unity different then programing for UE4

closed account (N8MNAqkS)
so I have been watching people program in both of these engines and some functions look different in unity then they do in UE4. and then I learned about header files and I think I have realized something that I need someone to confirm.


so I have come to the conclusion that when you download unity(or UE4) that it comes with some pre compiled code inside of something like a header file, and this file is full of code made specifically to be used to control that engine.


for example, when I see people who program in unity, and they want the camera to rotate automatically, or anything to rotate automatically for that matter, they type something like: rotate.someMethod(), and then a number to determine how fast it spins. but this does not work in UE4 or inside of VS itself.


so am I right to conclude from this that I will have to learn how to program in unity separate from learning in VS, which is also different then learning to program in UE4.
Last edited on
Unity and UE4 are two different engines, independently created, with two different codebases, and two different APIs (the functions that you as a user of those engines/libraries call).

Header files usually do not contain much logic by themselves (though they can, e.g. templates). Usually, header files simply declare the functions that are implemented elsewhere, so that your program knows that those functions exist, and can call them. The actual functions might be in an implementation file, or a statically or dynamically linked library that EU4 or Unity must provide.

If you're using Unity's development environment, you're most likely writing C# or Javascript scripts, in which case things like header files don't apply. But if you're writing C++ for Unreal Engine 4, then you'll most likely still be using header files.

__________________________________

Edit:
so am I right to conclude from this that I will have to learn how to program in unity separate from learning in VS, which is also different then learning to program in UE4.

Unity and Unreal Engine have their own IDEs that internally use their pre-made engine, and you'll be writing code that goes on top of that existing engine layer. Visual Studio is more general; you're writing code for any purpose.

As far as the code itself goes, it's just text. Doesn't matter whether you write that in Visual Studio, or in Notepad.
Last edited on
closed account (N8MNAqkS)
so for the most part I was right, unity contains code that wont work in UE4.

cool but...

are you saying that unity does not support c++. or are you saying it doesn't need header files either way. if unity does not support c++ then :(

that's a bummer. I really don't feel like learning 2 languages. I will if I have to but :(
I believe there are wrappers that allow you to use C++ to interact with Unity, but I am not familiar with this. I don't believe it would be very useful, Unity's IDE drives you towards writing in C# or Javascript.
closed account (N8MNAqkS)
you make me cry...




does cryengine support c++ at least.

im wanna be game dev, if you have not noticed yet.
im trying to find engines that support c++ and I don't know which ones to use. I have a lot of ideas for big games, and I have some ideas for smaller games that, once I get a good enough PC to run an engine(btw u know anyway to earn a quick 3000 dollars XD) im going to practice making. and then in like 400 years when im good enough to make a game someone actually wants to play ill work on those bigger ideas. and I know a few that might serve my needs, like cry or UE4, but unity was almost perfect for what I was planning.
I want to clarify that I'm not familiar with using C++ with Unity. I've only ever used C# with it. I would do a search yourself with this. I'm sure it is possible in some way, it's just my opinion that I don't see a big benefit to this.

Maybe someone else reading this will have better input.

The game engine does a lot of the low-level work for you. I would start with small games, to practice. Practice one concept at a time. And then when you get used to the workflow of making games with a game engine, then make more complicated games. Start small. If you try to create a huge game as your first project, you'll get burnt out -- avoid that. Write down your ideas and save them.
Last edited on
Topic archived. No new replies allowed.