"3unity-tips-tricks" Posts

Understanding Spherecasts in Unity

SphereCast-Example

SphereCast and all related pages are confusing.

The easiest way for me to describe Spherecasts in the shortest terms possible is to post my bug report:

(more…)

Unity Bug Reporter Icon

UnityBugIcon

I find that on the occasion that I need to report a bug in Unity (which for me is usually reporting documentation issues), it can be annoying to see two identical icons when swapping between applications using keystrokes (<cmd> + <tab>).

By default, both Unity and the Unity Bug Reporter share the same icon! o.O?

SO – I made a new icon for the Bug Reporter.

Here is the png.

Here is the Photoshop file.

Here is the .icns file for Mac users.

JS to C# converter

M2HCS2JS

This is a link to a page on the M2H Game Studios‘ site that converts UnityScript/Unity.js to C# converter:

http://www.m2h.nl/files/js_to_c.php

This is very convenient site.

You can paste your Unity JavaScript (UnityScript) code into the top box on the page, hit process, and get the C# out the bottom!

(more…)

Basic Inventory and Looting System

Inventory-iPhone

I’ve been looking through the Unity3D forums for information and answers about creating a basic inventory system. The analogy that I was trying to work towards was a system more akin to Worlds of Warcraft, where the player is looting objects such as chests or dead opponents rather than picking up objects from the ground, and discarding objects would simply destroy the item rather than “drop” the item back  into the game as a newly instantiated GameObject.

From my search, three threads stood out:

http://forum.unity3d.com/viewtopic.php?t=11865    Der Dude

http://forum.unity3d.com/viewtopic.php?t=46222    Alexwilds

http://forum.unity3d.com/viewtopic.php?t=51475    stneas

All three of these systems deserve your time and analysis as they all have different approaches to creating an inventory system. (more…)

Simple iPhone Calibration

Quaternion

For Moonbase: Lander I needed a way to calibrate the starting or neutral position of the device in a manner that could be stored and re-used during game play.

I looked on the Unity3D forums, and found this thread:

http://forum.unity3d.com/viewtopic.php?t=15684

… where Sandoze, from Fuel Games posted their solution.

 

I converted this from C# to Unity.js, and later modified it with the help of Neil Carter (NCarter) on the #unity3d irc channel.

And this is what I finally came up with:

(more…)