Search Unity

Feedback errors between code and screenshot of code

Discussion in 'Documentation' started by nosarious, Mar 10, 2023.

  1. nosarious

    nosarious

    Joined:
    May 14, 2014
    Posts:
    16
    While using the information on this page I found errors between the code and the screenshot of code which made it difficult to actually rely on the information presented on the website.

    https://learn.unity.com/tutorial/placing-and-manipulating-objects-in-ar

    At the section for creating the interaction script there are several text fields of code (which cannot be copied from, as discussed in a separate thread).
    https://learn.unity.com/tutorial/placing-and-manipulating-objects-in-ar#605103a5edbc2a6c32bf5662

    There is also a graphic of the completed script, but if you do manage to type everything in from the text fields, it will be different than the image.

    Specifically these lines are missing from the code text fields:
    Code (CSharp):
    1. RaycastHit hit;
    2. Ray ray = arCam.ScreenPointToRay(Input.GetTouch(0).position);
    Aside from the inability to copy/paste these missing lines will make it difficult for a new user to get the most from the information on this page.
     
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    I mean, i love the Unity Engine, but in my opinion, Unity's official released tutorials are amongst the worst there is. Theres just so many other sources that do a far better job of 'Teaching' Unity.
     
    nosarious likes this.
  3. nosarious

    nosarious

    Joined:
    May 14, 2014
    Posts:
    16
    I agree, but this is the first thing that comes up on google, so it should be fairly consistent.

    As well, I find many of the other sources to be out of date:

    https://github.com/fariazz/ARFoundationPlacementIndicator

    This is one for applying a placement indicator, but it is four years out of date. Stepping through all steps with the latest version of unity (2023) and ARFoundation (5.0.4) will result in breaks due to the way "using UnityEngine.XR.ARSubsystems;" works in 5.0.4. For instance, not including that line will result in an error that '
    TrackableType.Planes cannot be used'... even though SubSystems is included in ARFoundation 5.0.4...

    If you include that line there is an error about how Quarternion cannot be resolved to Vector3. (I never saved the errors, so terminology might be broken). Searching for solutions doesn't really offer ways to fix the problem.

    And I cannot find a learn.unity.com equivalent for placing a reticle or indicator...

    To resolve 'my' difficulties I stepped back to a 2022 version and older ARFoundation, but, as an advocate for streamlining the entry for new users, I feel it is important to post here as a record of a problem. It's a vague hope that someone at Unity will fix the issues with the website, but it may also help people who discover copy/paste doesn't work as expected on that particular site.
     
  4. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    Well to be fair... that version seems a little broken, i mean, even the LTS' have had some issues that stem across EVERY version, and have never seen resolve. lol.

    But, i would most definitely , not be using alpha beta, or even non LTS versions. That's just me.
     
    nosarious likes this.