Search Unity

Unity Game Development Essentials

Discussion in 'Community Learning & Teaching' started by Merries, Jul 28, 2009.

  1. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    I've had this book for a couple years now and loved it.
    So much in fact that I still use a few things from it pretty often.

    So i was wondering if you plan on ever doing another book Will?

    Everything I have read or videos I have watched that you did were in my opinion the best and I learned the most from.
    Thank you a bunch for it all.
     
  2. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    794
    Yes I'm actually working on one now! finally.. after a few false starts.
     
    OboShape likes this.
  3. Ologon

    Ologon

    Joined:
    Nov 16, 2014
    Posts:
    16
    Just finished reading this book. It has proven to be an invaluable source for starting with unity, thanks! :)

    I had fun making some additions to the final game which now has an horror twist ;)
    http://yolon.altervista.org/survivalisland.php
     
    Last edited: Nov 17, 2014
  4. eric848

    eric848

    Joined:
    Nov 9, 2014
    Posts:
    4
    okay I have finished to write the cript and there is no errors, however, when i walk towards a battery, it won't let me collect it and the door doesn't open

    Here is the script:
    var BatteryCollect : AudioClip;
    private var doorIsOpen : boolean = false;
    private var doorTimer : float = 0.0;
    private var currentDoor : GameObject;

    var doorOpenTime : float = 3.0;
    var doorOpenSound : AudioClip;
    var doorShutSound : AudioClip;

    function Door(aClip : AudioClip, openCheck : boolean, animName : String, thisDoor : GameObject){
    audio.PlayOneShot(aClip);
    doorIsOpen = openCheck;
    thisDoor.transform.parent.animation.Play(animName);
    }

    function Update(){

    var hit : RaycastHit;

    if (Physics.Raycast (transform.position, transform.forward, hit, 3)) {
    if(hit.collider.gameObject.tag=="outpostDoor" && doorIsOpen == false && BatteryCollect.charge >= 4){
    currentDoor = hit.collider.gameObject;
    Door(doorOpenSound, true, "dooropen", currentDoor);
    GameObject.Find("Battery GUI").GetComponent(GUITexture).enabled=false;
    }else if(hit.collider.gameObject.tag=="outpostDoor" && doorIsOpen == false && BatteryCollect.charge < 4){
    GameObject.Find("Battery GUI").GetComponent(GUITexture).enabled=true;

    }
    }


    if(doorIsOpen){
    doorTimer += Time.deltaTime;

    if(doorTimer > 3){
    Door(doorShutSound, false, "doorshut", currentDoor);
    doorTimer = 0.0;
    }
    }
    }

    function OnTriggerEnter(collisionInfo : Collider){
    if(collisionInfo.gameObject.tag == "Battery"){
    audio.PlayOneShot(BatteryCollect);
    Destroy(collisionInfo.gameObject);
    }
    }

    @script RequireComponent(AudioSource)
     
  5. Shapeshifter878

    Shapeshifter878

    Joined:
    Jun 19, 2015
    Posts:
    1
    I'm almost done with this book, but I can't seem to get the FPS to show up(instructions under "Frame rate feedback", p. 279). What I've done:

    Created a new empty game object(FPS displayer) in the Island scene and added a GUI Text component to it. Created a new JavaScript in the Scripts folder that looks like this:

    #pragma strict

    private var updatePeriod = 0.5;
    private var nextUpdate : float = 0;
    private var frames : float = 0;
    private var fps : float = 0;

    function Start () {

    }

    function Update () {
    frames++;
    if(Time.time > nextUpdate){
    fps = Mathf.Round(frames / updatePeriod);
    guiText.text = "Frames Per Second: " + fps;
    nextUpdate = Time.time + updatePeriod;
    frames = 0;
    }
    }

    @script RequireComponent(GUIText)

    I add this script to the new FPS displayer object, but still no fps is showing neither in Unity nor when I run a standalone build of the island. There are no compiling errors with the script from what I can see.
     
  6. genesiscreation7

    genesiscreation7

    Joined:
    May 20, 2016
    Posts:
    1
    I'm in chapter 3 and it asks me to import package physic materials but there is no physic materials so I cant bounce my ball