All posts in "Unity3D"

Unity Video Player with Controls & Time Scrubber

By Jason Weimann / April 25, 2018

Playing video in unity3d is easy now with the videoplayer component.  But you do still need to hook up controls if you want your users scrubbing through the timeline, pausing, playing, or skipping.  Here, I’ll cover everything you need to get a video player working, with time tracking, skipping, and more.  And you can load your video from a web url / http endpoint or a local file…  Follow along and build it yourself or just download the source and drop it into your own project now.

 

 

Download the full source here: https://unity3dcollege.blob.core.windows.net/site/YTDownloads/VideoPlayerControls.unitypackage

Continue reading >
Share

Mobile Swipe Detection In Unity3D

By Jason Weimann / April 24, 2018

Need to detect swipes for your unity mobile game or app?  This simple script will let you do that in a clean maintainable way.  Detect swipes for your android or ios devices in your Unity game with a simple event callback… all reading Input.Touches underneath.

Download the source as a UnityPackage here: https://unity3dcollege.blob.core.windows.net/site/Downloads/SwipeDetection.unitypackage

 

Continue reading >
Share

Unity3D Survey Results

By Jason Weimann / March 19, 2018

The Surveys..

Subscribers to my email list know that I like to send out surveys from time to time.

Sometimes it’s just spurred on by a post or video I come across, and I just want to verify the info.

Much of the time though, it’s just me, thinking about something… and wondering what everyone else thinks.

In this post, I’m sharing the results of a few of those surveys….

BUT, I’m also leaving them open, so if you want to chime in with your personal view or data points, please share 🙂

 

SOLID Principles

This survey left me happy, knowing that most people had at least heard of the principles, regardless if they were using them.

Coding Standards

Here, I was happy to see that my choice to ditch the _ seems to be the most popular one.  If you were wondering why I stopped using it, I talked a bit about it in this video: https://www.youtube.com/watch?v=oDVan60VBPs

Sallaries

This was the only survey that made me sad…  So many developers worldwide need to be paid way more (IMO)


Code Length

When it came to code length, I think most people got it right.  100-200 is a good range for a class (though many should be smaller, depending on the specifics).


Continue reading >
Share

Build a 3rd person shooter in Unity – Part 2

By Jason Weimann / February 3, 2018

Build a 3rd person shooter from the ground up. Part 2 of this series covers weapon use (firing a gun in Unity) with raycasting to hit the correct targets.  We’ll also setup a reusable health system for our bad guys, player, and even props.  Then we’ll drop into particles for muzzle flashes and sound effect basics.

 

 

Get the Third Person Control Code

Download The Muzzle Flash Particle – —>>> HERE <<<—

 

Get the Gun & Health Code

Continue reading >
Share

Build a 3rd person shooter in Unity – Part 1

By Jason Weimann / February 1, 2018

Build a 3rd person shooter from the ground up. In this series we’ll put together all essentials for a 3rd person shooter game in Unity3D. We’ll do character control, shooting, exploding, animating, making loud explosions, and more! If you want to build a third person shooter, follow along 🙂

 

 

 

Get the Third Person Control Code

Continue reading >
Share

Unity3D UGUI Hold to Click Buttons

By Jason Weimann / January 30, 2018

Need buttons that don’t click instantly for your Unity3D UGUI project?  Try this simple Hold to Click script.  Use it to specify how long you want the user to hold the button before it clicks, and give the user some visual feedback on how much longer they need to hold it.  Everything ties in directly with standard Unity events, so hooking it up is no different than a standard UGUI button.

The Click to Hold Button Code

See how the click to hold button works

Continue reading >
Share

SOLID Unity3D Code Architecture – The Open Closed Principal

Are you ready to start using the SOLID principals in your Unity3D Project?  Learn how the Open Closed Principal (the O in SOLID) can make your game easier to develop, extend, and maintain.  By using simple interfaces and separating out some code, we’ll convert a solution that’s destined for messiness into a clean and SOLID Unity3D project.

Video

What to Look Out For

  1. Adding new functionality requires you to modify your existing classes
  2. Your class is handling different inputs in different ways to the same method.
  3. You start to see if & else if statements cluttering your code.

Ways to Implement The Open Closed Principal in Unity

  • Have your classes act on interfaces, not discrete implementations
  • Use base classes and override their functionality
  • Add events to your class and have other components on the gameobject register for those events instead of the class calling them directly

 

Continue reading >
Share
1 6 7 8 9 10 21
Page 8 of 21