Search Unity

3d platform tutorial error

Discussion in 'Editor & General Support' started by JakobWagner, Aug 2, 2010.

  1. JakobWagner

    JakobWagner

    Joined:
    Aug 2, 2010
    Posts:
    19
    Hi Forum

    First of all, hello to everybody here.

    I've just started on Unity3D. I am totally newb. Although I have several years OOP experience and experience in 3D animation. Most of my programming experience comes from Flash.

    I am very impressed with Unity so far. It is much more professionally build than I had hoped for.

    I have a couple of starter questions all ready.

    1. Iphone development: Does anybody know for sure that apps build with Unity won't be banned from the app store in the nearest future?

    2. I'm going through the 3d platform tutorial with the alien and I haven't gone far. Precisely I'm at the beginning of page 19. I get this error:

    NullReferenceException: Object reference not set to an instance of an object
    SpringFollowCamera.LateUpdate () (at /Users/PB G4/_Work/______Unity_Demos/Lerpz_3D_Platformer/Assets/Scripts/Camera/SpringFollowCamera.js:44)

    Does anybody have an Idea of what I'm doing wrong?


    // Jakob
     
  2. stimarco

    stimarco

    Joined:
    Oct 17, 2007
    Posts:
    721
    1. My reading of Apple's Developer Agreement suggests there shouldn't be any problems.

    Apple's beef is with Adobe's Flash, which completely bypasses Apple's own development tools and code libraries by using its own. (The reasons why this is not a Good Thing have been discussed elsewhere and boil down to two competing views on how Design—with a capital "D"—should be done.)

    Unity, on the other hand, explicitly requires Apple's developer tools and libraries in order to produce iOS (i.e. iPhone, iPod touch and iPad) applications. As these tools and libraries are available for free download from Apple, it's not an issue for developers. Most importantly, it means any new features or technologies Apple introduce with a new device are automatically integrated by just re-building your application.


    2. That error is usually caused by forgetting to set a variable in the Inspector. "SpringFollowCamera" is the script which handles the third-person camera's movements and it needs to be told what its 'target' is. This is usually the Player character in the game. Check that the script's "Target" variable has been set accordingly in the Inspector. If it hasn't, drag the "Player" GameObject from the Hierarchy pane into the "Target" slot in the Inspector to set it. You can also click on the empty slot to bring up a long list of possible targets.

    (Note that the "SpringFollowCamera" script specifically looks for the "Character Controller" script in the Player GameObject. If it doesn't find one, it'll complain about that too.)
     
  3. JakobWagner

    JakobWagner

    Joined:
    Aug 2, 2010
    Posts:
    19
    Thanks for the quick answers.

    1. This was not to start a for/against flash discussion. Being a Flash developer for the last decade I know all the problems flash have.
    I just wanted to make sure before investing a lot of time in Unity.

    2. Thanks, I found and fixed the problem.

    Jakob