Learn how to create a simple system to allow players to place any object you want while they’re playing. Let them build houses, drop down turrets, or even characters. In this video I’ll expand upon the previous building script with the ability to place any number of different objects using simple hotkeys.
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.
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.
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).
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.
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 🙂
Select characters & swap their weapons – or select anything and modify something on it… This video shows how to hook up buttons so they’re contextual, and act upon that context. Use it for weapon equipping, customizing space ships, adding props to rooms or anything else that needs actions based on a selection!
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.
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
Adding new functionality requires you to modify your existing classes
Your class is handling different inputs in different ways to the same method.
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