ryanwold.net

A civic-minded citizen seeking the singularity

Back to Entries

Unity3d

release
Date: 2016-05-03
Tags: unity3d 3d

I've been playing with Unity lately, and I've been loving it. Unity is designed as a video game platform that can be deployed to Macs and iOS products, Android, Windows, and more.

Unity consists of:

  • an Editor - a 3d environment with scriptable objects.where you can build a game/app/etc
  • an Engine - a deployable 3d environment for what you've built

Environment

In Unity, objects live in a hierarchy. The Hierarchy is a tab that lists objects in a project.

A few different type of objects exist: * Camera * Light * General Objects * Cubes * Spheres * Capsules * Your custom 3d shapes * Third-party 3d shapes

Programming

Unity is a nice development environment to work in. Very basically, it is easy to create Objects and create Scripts that give those objects Behavior.

Unity supports C# and Javascript. It also supports a language called Boo. I wanted to use Javascript because I was familiar with it, but I found out that Javascript support is limited in odd places currently, and figured a strongly-typed language (C#) wouldn't be a bad thing to learn and practice.

The API docs are here.

For each object above, Unity encourages writing Scripts and attaching the scripts to add behavior to the objects. Scripts make it possible to manipulate objects texture, position, rotation, size (these 3 attributes make a Transform). So, we can modify each object's transform with scripts.

Scripts

When attaching a script to an object in Unity, C# classes default with the following 2 methods.

Start () {}
Update () {}

Other available methods are:

FixedUpdate () {}

Testing

Animations

Lerping. "Lerp" stands for linear interpolation. I knew this concept at "Tween" from Macromedia Flash.

By Ryan Wold · © 2016–2026 Ryan Wold

Licensed CC BY-NC 4.0. AI training requires a license — machine-readable terms.

Enjoyed this? — any BSV wallet, HandCash, or plain old dollars.

Leave a tip

Tips go directly to a Bitcoin SV address I control — peer to peer, no platform in between. A few thousand satoshis is a fraction of a cent; it's the gesture that counts.

From any BSV wallet

Scan the QR code with your wallet's camera, or copy the address.

177DwUfSTW8RkFBJzYYcgr1YB8ngbhTYAc

With HandCash or any paymail wallet

Paymail is an email-style address for Bitcoin wallets. Send any amount to afomi@handcash.io

First time using Bitcoin? Yours Wallet is an open-source browser extension wallet, and HandCash is an easy mobile wallet — either takes a minute to set up.

Prefer regular money? Support via OpenCollective.