What is RUNTIME in programming — Example in Unity

Definition of runtime

In pro­gram­ming, RUNTIME is the time inter­val from the moment the oper­at­ing sys­tem starts exe­cut­ing the instruc­tions of a giv­en pro­gram until the end of its exe­cu­tion, either because the pro­gram was suc­cess­ful­ly com­plet­ed or because it was ter­mi­nat­ed by the oper­at­ing sys­tem due to a run­time failure.

Dear read­er


Runtime in Unity

When we are devel­op­ing a game or appli­ca­tion in Uni­ty, the run­time of our pro­gram starts when we press the Play but­ton until we press Stop and also when we make a com­pi­la­tion for win­dows for exam­ple, the run­time starts from the moment we run the appli­ca­tion until it is finished.

It is impor­tant to under­stand this con­cept of run­time in Uni­ty because we have to be able to han­dle sit­u­a­tions that will occur dur­ing the exe­cu­tion of the pro­gram, for exam­ple ene­mies that appear in the mid­dle of the game, these ene­mies will need to be pro­vid­ed with cer­tain infor­ma­tion that was not pos­si­ble to give them at the time of game devel­op­ment sim­ply because they did not exist at that time, so the per­son respon­si­ble for cre­at­ing these ene­mies must also give them the infor­ma­tion they need, for exam­ple the ref­er­ence of the play­er they have to attack.




Scroll to Top
Secured By miniOrange