Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. 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:
    463
    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. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,698
    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:
    36
    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. Komidas

    Komidas

    Joined:
    Jun 22, 2022
    Posts:
    1
    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:
    6
  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)
    })