Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Can't copy text from web tutorial code samples

Discussion in 'Documentation' started by chrismarch, Jul 15, 2020.

  1. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    paulksi likes this.
  2. beetlefeet

    beetlefeet

    Joined:
    Mar 3, 2014
    Posts:
    2
    Same here. This is insane for a CODE TUTORIAL?! How long has it been broken like this?
     
    paulksi likes this.
  3. Workaround (on windows in Chrome Browser): select all the code, right-click, print. In the print preview you can select all the code and you can copy it from there.
     
    paulksi likes this.
  4. hekec

    hekec

    Joined:
    Mar 23, 2021
    Posts:
    3
    Same problem, makes it much harder to follow the tutorials
     
  5. Maxim

    Maxim

    Joined:
    Aug 17, 2009
    Posts:
    38
    This is not a bug, but an intentional function.
    Copying is a standard OS & Browser function. And you need to take some actions (in javascript) to prevent its work.
    Some not too smart person thinks this is for good or just sabotages.
     
    Last edited: Nov 20, 2021
    mgear likes this.
  6. paulksi

    paulksi

    Joined:
    Nov 9, 2015
    Posts:
    27
    mgear likes this.
  7. paulksi

    paulksi

    Joined:
    Nov 9, 2015
    Posts:
    27
    meanwhile, i just select all the code and then left click and then search google for then copying from google`s input tab
     
  8. zdolezal

    zdolezal

    Joined:
    Sep 27, 2017
    Posts:
    75
    Same here, like really? Unity? Tutorial? Prevent copy+paste?
     
  9. aeldron

    aeldron

    Joined:
    Feb 12, 2013
    Posts:
    32
    unity_27cjaffar and ThanosMoptil like this.
  10. Deleted User

    Deleted User

    Guest

    I just wanted to take some personal notes but couldn't copy and paste it. Writing notes manually is very exhausting especially with one monitor...
     
  11. Gilles_Baroin

    Gilles_Baroin

    Joined:
    Jan 26, 2022
    Posts:
    7
  12. ManuelMBSpain

    ManuelMBSpain

    Joined:
    Jul 16, 2023
    Posts:
    1
    Go to Browser > Developer Tools > Console and paste the following code to get the complete Script

    const codes = [...document.querySelectorAll('code')]
    codes.forEach(code => {
    const text = code.innerText
    console.log(text)
    })