Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Note to Documentation SetActiveScene and Object's Instantination

Discussion in 'Scripting' started by DSivtsov, Jul 29, 2022.

  1. DSivtsov

    DSivtsov

    Joined:
    Feb 20, 2019
    Posts:
    151
    SetSceneActive
    • "...The active Scene is the Scene which will be used as the target for new GameObjects instantiated by scripts and from what Scene the lighting settings are used..."
    It will be a true only in you Instantiate the "Root Objects" in hierarchy of the Scene. If you create the objects under some Parent's transform, the Scene for the new Object will be defined from the where exist the Parent's transform.
    Instantiate(test, testParent.transform);

    Will be good to make a note to Unity doc.

    OFFTOP
    Strange why Unity not use for the documentation the version control system like Microsoft, the community members have a possibility to make some proposal on Doc change (like as a Pull Request on Github) which after accepted or not by Unity Team will can automatically Update the Doc?
    It can make Unity Doc more comfortable for new users and low the loading the Team responsible for Unity Documentation.
    I some times send a Feedback (and proposals) on some pages of Unity Doc but didn't receive not any reply.
    Do you know - Does anyone read these messages or not?:(:)
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    Good question. I have been reporting this issue since 2018 and the documentation AND sample code is still broken for this:

    --------->

    I wrote about this before: the Unity example code in the API no longer jumps reliably.

    I reported it to Unity via their docs feedback in October 2020. Apparently it is still broken:

    https://docs.unity3d.com/ScriptReference/CharacterController.Move.html

    Here is a work-around:

    https://forum.unity.com/threads/how...racter-movement-in-unity.981939/#post-6379746

    I recommend you also go to that same documentation page and ALSO report that the code is broken.

    When you report it, you are welcome to link the above workaround. One day the docs might get fixed.
     
    DSivtsov likes this.
  3. DSivtsov

    DSivtsov

    Joined:
    Feb 20, 2019
    Posts:
    151
    :) i already did it before and gave my recommendation proposal

    TFS (Time for smile)
    "...Maybe Monday, maybe not..." (from "The Man I Love", Song by Ella Fitzgerald)
    The word "Man" must be replaced on the "Product" (Unity) :))
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,606
    Dunno if it needs to be noted as it makes perfect sense. You can't very much have an object be in one scene while parented to an object in another scene. I don't know why anyone would expect that to be the case.
     
    Kurt-Dekker likes this.
  5. DSivtsov

    DSivtsov

    Joined:
    Feb 20, 2019
    Posts:
    151
    IMHO This is another case, when we Instantiate an Object, it doesn't exist not in any Scene, therefore exist the two possibilities, when the use the command
    Instantiate(test, testParent.transform);
    and mentioned objects not in the Active Scene:
    1. As it works now
    2. And It can be forbidden (with error message like " you can't instantiate objects not in Active Scene").
    I agree, It's can be simply checked, but my IMHO current DOC doesn't correctly describe the "As it works now".

    And when I met with this issue, I read docs and make quick searching, but didn't find this workaround "creation Gameobjects not in Active Scenes".
    Many new users haven't so deep understanding the concepts of Unity and I think it can be useful for them, and also I hope it can initiated the process of correction the correlated Unity documentation also.
    P.S>
    And also for me was interesting, when I'm spending the time to make proposal for documentation correction, this information does it used by Unity Team or Not? :) Thank you for @Kurt-Dekker for reply
     
    Kurt-Dekker likes this.