Unity Change Color of Material

This week I have a super quick tip for you. If you need to change the color of an object in Unity, it is pretty straight forward.

First you need to get a reference to the object’s Renderer component. A good place to do this may be in the Start method:

Renderer rend;

// Use this for initialization
void Start () {
  rend = GetComponent<Renderer>();
}

Then inside of the Update method, you could change the the color (like when the Mouse button was just pressed):

void Update () {

  if (Input.GetButtonUp("Fire1"))
  {
    rend.material.SetColor("_Color", Random.ColorHSV());
  }

}

That really is all there is to it. If you want a little more information on why the magic string of _Color is used, make sure to check out the video this week:

Unity Hub

This week I spend a little bit of time talking about how much I like the Unity Hub. It allows you to easily install new versions, uninstall old versions, quickly install or uninstall components and quickly open solutions with a specific build target.

You can download it here:

http://chd.me/unityhub

Check the video:

Hill Valley VR – Windows Mixed Reality via Edge – Back to the Future

Last week, I mentioned the Universal GameDev Challenge presented from Microsoft, Unity, Intel and Universal Studios. Like I mentioned last week, the Back to the Future intellectual property that can be used in the contest really got my attention.

It reminded me about a 3D experience I was able to have a peek into Hill Valley through a web browser. I saw it about the time that WebGL was coming out.

Well, I started digging into WebGL and WebVR a little bit and came across the demo on the Babylon.js site.

You can watch this week’s video where I show Hill Valley VR running through Edge on the Windows Mixed Reality device.

I mention it in the video, but I’ll say it here as well… The contest is for Windows 10 Universal games, not for WebVR. I just didn’t want there to be any confusion. It is the Universal GameDev challenge because it is running as a Universal Windows app and you get to utilize Universal Studio’s IP… see what they did there?

Enjoy the video!

Universal GameDev Challenge

Microsoft, Unity, Intel and Universal are sponsoring a game development challenge where the winning team will walk away with $150,000 USD.

The cool thing about this Windows 10 game development challenge is that you can use Universal’s IP like Back to the Future!

In fact, you can come up with a game design for Back to the Future, Voltron Legendary Defender, Battlestar Galactica, Turok, and even Jaws!

To enter, you need to head over to connect.unity3d.com/challenges/universal and submit a game design document in PDF format of no more than 13 pages. Plus you’ll need to submit a ‘pitch’ video where you will introduce yourself, your team, talk about your experience, and your vision. You can even include additional content like concept art, videos, models, or story.

The deadline to get your game design document submitted is April 19, 2018.

I talk about this some in this weeks’ video, but I also talk about some of the things Unity announced at GDC.

Check it out!