Unity Community


Page 4 of 19 FirstFirst ... 2345614 ... LastLast
Results 61 to 80 of 376

  1. Location
    Los Angeles
    Posts
    42
    Here's the new tread for the builds section
    Thanks for your support Sue

    http://forum.unity3d.com/threads/960...k+Sue+Blackman

    or search...
    PROJECT SHOWCASE for Beginning 3D Game Development with Unity, book by Sue Blackman

    -Lawrence
    Last edited by Zoneman; 07-09-2011 at 11:52 AM.
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  2. Location
    Los Angeles
    Posts
    42
    Upgrade script error: for Unity 3.4

    When opening the Chapter 16, I get the following error(s): note similar errors are listed in other scripts, and I didn't check the other chapters.

    "Assets/Adventure Scripts/BouncerManager.js(34,63): BCE0120: 'GameManager.currentInventoryObjects' is inaccessible due to its protection level"

    I looked up the " JavaScript Upgrade Guide for Unity 3.4, clearly addresses the error . But since, I am a n00b, I don't know how to correct. Here is the Unity explanation:

    "Unity 3.4 ships with an improved javascript compiler that supports better type inference heuristics for commonly used Unity APIs such as GameObject.GetComponent and Object.Instantiate as well as a stricter strict compilation mode (#pragma strict). The benefits are improved error checking and more efficient code generation leading to faster execution times. The downside is that in some particular cases code that compiles cleanly with Unity 3.3 might be (correctly) refused by the 3.4 compiler as in the following example:

    // var definition in Foo.js
    private var value = 42;

    // attempt to use Foo.value in Bar.js
    GetComponent(Foo).value = 21;

    In Unity 3.3 the code above compiles without errors but 3.4 will complain with something similar to:

    Assets/Scripts/Bar.js(2,1: BCE0120: 'Foo.value' is inaccessible due to its protection level.

    That's because the 3.4 compiler can infer the call to GetComponent to return a Foo instance and it can see that Foo.value is marked private whereas in previous versions precise type information was lost at the GetComponent boundary. The solution is to mark Foo.value as either internal (accessible only to javascript code in the same project) or public (accessible to any code anywhere) - removing the private marker will have the same effect as marking it public."

    http://unity3d.com/unity/whats-new/unity-3.4

    TIA
    Lawrence
    Last edited by Zoneman; 07-28-2011 at 05:48 AM.
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  3. Location
    Los Angeles
    Posts
    42
    I found a possible solution for this error: [Minor fix..]**** note I'm not an expert.. just trying to help, use at your own risk.

    "Assets/Adventure Scripts/BouncerManager.js(34,63): BCE0120: 'GameManager.navigating' is inaccessible due to its protection level"

    First open the earliest incident where this happens, "BookProject Ch 06 Finished". Located the script error at the bottom in red. DoubleClick the red "!" icon. It opens the scripting panel for "Interactor.js" and hi-lites the script in question.

    if (controlCenter.GetComponent(GameManager).navigatin g) return;

    Since the "GameManager…." is inaccessible, that probably means one of it's variables need to be "public". Note the call to "navigating" which is probably the variable that is not accessible. Open the "GameManager" script and remove the "private" from the "private var navigating : boolean; // flag for navigation state" making it just " var navigating : boolean; …" this will make it public and the "Interactor.js" script can access that variable.

    Unfortunately it seems we will have to manually fix all subsequent incidents in the following chapters, which will include more cases of protected variable errors. Fix them on a needed bases. Just repeat the above for each project.
    Last edited by Zoneman; 07-28-2011 at 01:34 PM.
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  4. Location
    Los Angeles
    Posts
    42
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  5. Posts
    17
    So for those of us who have not started the book project yet, should we use Unity 3.3 or 3.4?

    Any suggestions?


  6. Location
    Los Angeles
    Posts
    42
    Definitely stick with 3.3, if you're fairly new to scripting.

    I think the book is great and I found not errors so far I'm at page 407. But I already upgraded, and will muddle through the rest of the lessons. I have already manually updated several the code samples, and they seem to work. But I tried to jump ahead to fix code in the final chapter (there are 51 error incidents in the final chapter lesson). After I fixed them it still didn't work. Again, the fix is really simple, just changing the private vars, to public by removing the private keyword. And making sure all the related function, class, components, that are involved are correctly adjusted.

    Fixing the code in later chapters, you might see, simply changing the vars to public may not automatically fix all the problems. My guess is it will not be difficult to make further adjustments to get the code to work.

    In tandem with completing the book lessons, I am developing a unique game based on lessons. And I will use version 3.4. So I will have to use the new public/private var rules.

    Also, after I upgraded to 3.4, and tried to publish a few generic builds to iOS, I had to rack my brain to get it to work (best to start with no packages).

    If you are okay with scripting, upgrading and working through the changes should be no big deal. I am a newbie and I'm up for it.
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  7. Posts
    615
    Thanks for the tips, Zoneman


  8. Posts
    17
    Thanks for the tips, Zoneman. I'll stay with 3.3.


  9. Posts
    8

    Curious

    I just bought this book last week, still waiting on it to be delevered. Question for ya Sue, Do you by chance go over any "Drag and Drop" ingame functionality?


  10. Posts
    197
    oh!
    hi all,
    you got so quiet I forgot to check the forum for a few days

    Zoneman, thanks for the heads up on the new release issues and welcome to the author's nightmare! Every little patch release seems to change the functionality and break scripts here and there. I guess if you're just making quick casual games it's no big deal, but anything longer term & these little changes are very frustrating.

    As soon as I can, I'll bite the bullet and put 3.4 on to see what we're dealing with.

    The problem with changing private to public is that it clutters the Inspector. We might be better off making a tiny function to return the value instead of accessing it directly.

    btw- your mars game is looking better and better

    Lazerath, just replied to your e-mail.

    Everyone- aside from the 3.4 issues, be sure to check the post publish fixes doc - I think I found stuff starting at chapter 10

    Sue


  11. Posts
    3
    Hi Sue,

    Just ordered and received your book and looking forward to diving in. Unfortunately, I do have Unity 3.4 so hopefully you can look into the new version soon.

    Thanks.

    Edit - where can I find the post publish fixed doc?
    Last edited by troll2; 08-01-2011 at 07:54 PM.


  12. Posts
    197
    The doc file is included with the 3+ gb asset download on the book's Apress webpage. For those of you using 3.4, I believe I have a finished exe (and the mac equivalent) for the straight book project and a bonus version in case you want to see what the project looks like at the end. And yes, I never assume things will still work in the next release, so usually keep a few full exes around .

    I think what I will do is start a 3.4 addendum to the doc and post it on my website and or someplace in this thread. that way it can be updated as we find things and readily available for a quick download.

    My gut feel for readers on the 3.4 change in JavaScript is to tough it out and make the changes as you go rather than do the whole project in the previous release. Or if it sounds too scary right now, maybe switch over around chapter 8 when people are feeling more confident, but before there is too much to change. As Zoneman and the others of you who are getting pretty far along can tell you, the project will be pretty substantial by the time you are through (at least in functionality) and it would be a shame to have all that effort go to waste as soon as you upgrade to 3.4.

    I won't get a chance to dig into this for a few days, but will try to offer up a few alternatives to removing "private" from the vars.

    Sue


  13. Posts
    3
    I download and unzipped the 3+ gb file from the Apress page, and am seeing what looks to be all of the folders and files properly. However, I can't for the life of me find this post publish fixed .doc file. I even ran a search on everything that was extracted and don't see it.

    Could you point me in the right direction (what subfolder is it saved in, or filename, etc) or maybe PM me? Has anyone else had luck finding this file?

    Thanks for your help.


  14. Posts
    197
    It should be in the root of the zip file, it's called PostPublishEdits.doc
    Has anyone else found it?
    I had to upload all the files separately, so not sure if Apress got it included in the mongo-sized zipped file

    No worry if not (unless you are already up to chapter 10) - I'll see about getting it up on my website sometime today or tomorrow

    Sue


  15. Location
    Nevada City(Sierra Foothills) California
    Posts
    5
    Hi Sue
    My name is Ron and so far have found your book to be right up the alley of what I want to try to work on in Unity.......a non shooter game along the lines of Myst; but like others here have had a very hard time getting the assets downloaded from the Apress web site. Truth is I haven't been able to succeed yet and have tried many times.I have tried several different browsers, different computers and also tried using a download manager. The file portions I have managed to download come across as corrupted. I have never had such a hard time downloading something on the web!
    I do want to thank you for putting out what appears to be a very good book, filled with many great features for our game writing challenges.
    My idea later will be to work on a third person character adventure type game with ladder/ ledge climbing, object throws, object pickups, object use or button push/ door open animations, etc.
    Any other way to get the assets out there in the real world might help other users if they are all having the kind of problems I have had and might make your book more usable. Keep us all posted if you go on a write another book using third person controller I would be very interested.
    P.S. 3d Buzz.com has some free Unity tutorials videos on Third Person Controllers, Jump, climb, slide, fall, and Camera control using C# scripts.
    Ron


  16. Location
    Los Angeles
    Posts
    42
    @ Sue Thanks for the nice comment for my Mars project. Your advice and criticisms are more welcome. Although, I know the following is beyond the scope of your book, and I'm probably getting ahead of myself…


    I started an iOS version of the book project (that's why I haven't update the website lately). I have navigation working [very easy], and the iOS Touches Event that correspond to Chapter 3. I have everything working except the SimpleRotationToggle script.

    1. I can't see how to make "SimpleRotationToggle,js" work as an external script. So I included it as a function within the script.
    2. My goal: After the first touch ends, the object continually rotates, after the second touch ends, the object stops rotating.

    Here is the code:

    // attach to a mesh to receive iOS Touch Events
    #pragma strict
    private var rotationState = 0;
    private var count = 0; // to increment the count of touches

    function Update(){

    if (Input.touchCount > 0){ // gets the touch input

    var touchControl:Vector2 = Input.GetTouch(0).position;
    var ray : Ray = Camera.main.ScreenPointToRay (touchControl);
    var hit : RaycastHit;
    var taps : int = Input.GetTouch(0).tapCount;

    if (collider.Raycast (ray, hit, 20)) { // raycast touches object

    //if the object is touched, check for tapCount condition
    //if there is a single tap, add 1 to the count and print
    if(taps == 1){
    if(Input.GetTouch(0).phase == TouchPhase.Ended) {

    rotationToggle(); // *************it only does one action, not continuous rotation.************

    count+=1;
    Debug.Log("This object tapped "+ count + " times");
    }
    }
    }
    }
    }


    function rotationToggle(){

    if (rotationState == 1){
    transform.Rotate(0,50*Time.deltaTime, 0);
    rotationState = 0;
    }
    else if (rotationState == 0 ) {
    rotationState = 1;
    }
    }

    If anyone is interested in continuing this thread or recommend we start a new thread let me know.
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  17. Posts
    197
    Hi Ron,

    I was hoping Apress would post the files as separate downloads, but they didn't - looks like their system only allows for one per book. My DSL today is getting a smokin' fast 4-12k/sec...so I know what you are experiencing.

    Can you try to dl from someplace faster? You will start needing the assets by about chapter 7. Most of the 3.2 GB is the project per chapter and a couple of exes for both mac & pc. The assets and scripts are only about 1 MB and it is silly not to be able to get them separately. Can you e-mailed APress and let them know you are having problems? That way if I bring up the subject, they won't think it's just me being fussy.

    I'll check out the 3d Buzz tuts & start thinking about integrating the characters, though I think it will make sense to wait until Unity gets the simple AI integrated so we'll be able to easily move a character from its current position to where the correct response gets triggered.

    Anyway, there is a lot of infrastructure to set up before worrying about animated characters, like controlling the camera (preventing it from going through objects, etc).

    Let us know how you get on with the download- maybe someone else will have suggestions for which download manager works best?

    Sue


  18. Location
    Los Angeles
    Posts
    42
    Sue,

    I can provide a download FTP links for the separate chapters, for the forum members. …For a limited time … not sure what my download quota is.
    Follow your Dreams, You may find your Purpose in Life.

    213-359-7262
    fletcher@zonesight.com


  19. Posts
    197
    Hi Lawrence,

    just taking a quick look at your code, this is what I see-

    in the book the functionality you are looking at is causing the object to rotate while being touched(a continuous input)
    in your sample, it needs to rotate between touches, so you would need something like:

    function Update () {

    if (rotationState == 1){
    transform.Rotate(0,50*Time.deltaTime, 0);

    }


    and

    function rotationToggle(){

    if (rotationState == 1){
    rotationState = 0;
    }
    else if (rotationState == 0 ) {
    rotationState = 1;
    }
    }

    np about being off topic a little- the book project is just a vehicle for getting familiar with not only Unity, but working out logic and becoming very good at analyzing need and solving problems

    Sue


  20. Posts
    197
    Re downloads-

    the most important files are:
    Scripts_By_Chapter.rar
    BookAssets.rar
    PostPublishEdits.doc

    I think we would have to have permission from Apress to post them somewhere other than their website.

Page 4 of 19 FirstFirst ... 2345614 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •