Sign up with your email address to be the first to know about new products, VIP offers, blog features & more.

 




Tag Archives how-to

How to play videos on Unity using new VideoPlayer

Unity 5.6 might be released this month. Playing Videos on Unity Apps and Games was one of the most awaited update and finally Unity is working on new video player. And here’s how to play videos on Unity using new VideoPlayer.

Introduction to Unity new VideoPlayer

VideoPlayer is a new game object component for playing back movies in your scenes in Unity. It aims at using the video hardware capabilities of both the editor and target platforms

The VideoPlayer can play movies that were imported with the new VideoClip importer. It can also read movies from StreamingAssets, local files or http sources, using progressive streaming.

[Video Tutorial] on How to play videos on Unity using new VideoPlayer

share

Data Flow Diagrams (DFD) – Concept, Symbols and Examples

Data flow diagrams (DFD) are graphical representation of the “flow” of data through an information system, modeling its process aspects. A Data Flow Diagram is often used as a preliminary step to create an overview of the system, which can later be elaborated.

Data flow diagram is a popular way to visualize the major steps and data involved in software system processes. This is not same as business process modeling; DFDs were usually used to show data flows in computer systems, although in theory be applied to business process modeling. DFDs are useful to document the major data flow or to explore a new high-level design in terms of data flow.

Understanding the Concepts of Data Flow Diagrams

Concept of Data Flow Diagrams (abbreviated as DFDs) was introduced by De-Marco in 1978 and also by Gane and Sarnon in 1979. DFD is an important tool used by system analyst.

share

How to bound gameobject within screen Unity

C# code to keep player or gameobject within the Screen view
[1] This will bound gameobject within screen unity and keep the pivot point a game object visible:

You can clamp it tighter if needed. Example:
pos.x = Mathf.Clamp(pos.x, 0.1, 0.9);
Viewport coordinates start at (0,0) in the lower left of the screen and go to (1,1) in the upper right. This code forces an object to have a viewport coordinate in the (0,0) to (1,1) range, and therefore to be on the screen.
[2] This will clamp the movement; i.e. it will feel like an invisible wall around the edges of the screen.

Just make sure this code happens after any physics movement adjustments, and you should be able to keep your rigidbody  stuff. If you encounter jitter, consider changing the code to something like this:

Questions:

  • How to keep an object within the camera view?
share

How to undo Git Commits

It is always been said that learning curve of Git can pose a challenge. However, Git has always been an exciting tool, that has enhanced developers ability to work together and ship faster. In the mean time, developers are challenged to undo what they did in past. Likewise, undo-ing commits already made on Git. Here’s a solution, we have put together some useful ways on How to Undo Git Commits.

Undo a git commit and redo

  1. So, you’ve made a commit and now it has to be removed.
  2. This leaves your working tree (the state of your files on disk) unchanged but undoes the commit and leaves the changes you committed unstaged (so they’ll appear as “ Changes not staged for commit ” in git status  and you’ll need to add them again before committing). If you only want to add more changes to the previous commit, or change the commit message [1],
share