Game Development Reference
In-Depth Information
A handy tip when assigning multiples of anything from a scene to an
array property in the inspector is to Lock the inspector and then drag
them all at once.
To lock the inspector simply click the Lock icon in the upper-right hand
corner of the Inspector window. While locked, it will not change its view
to any other objects selected in the scene. This allows you to multiple
select all the Pickups or Alarms and drag them all at once to their
respective properties in the Inspector window.
For a visual explanation of this, check out the second image in the set of
animated GIFs at http://bit.ly/UnityAnimatedTips (also check
out the others while you are at it!).
Summing up the Event System
With great power comes great responsibility. This is so true with the new
EventSystem ; there is a lot going on under the covers and a lot of performance
tweaks and enhancements that are unseen.
Granted, the previous example could have been achieved with delegates and a
singleton manager coordinating everything, but it is a very basic example.
In truth, it could be a whole lot bigger with a scanner module that looks for collisions
near the player that feeds into the alarm system, or independent radar style scanners
for each alarm. Because the system is so modular, you can craft almost anything in a
componentized fashion and it will be fast (provided you stick to the rules). Plus the
interface design ensures it is fast and easy in a more object-orientated way to design
your game and be sure it's not going to break in some freakish fashion.
I leave it to you to play further (or wait until I publish a new free, fully featured
bonus tutorial on my blog).
Examples, examples, and even more
examples
Now I could probably go on for several more topics creating and walking you
through many different code examples; however, this time I've created a public
repository of all the scripts I have either come across, put together, or enhanced
in my journey through the Unity UI, which can be found at http://bit.ly/
UnityUIExtensions .
 
Search WWH ::




Custom Search