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. Dismiss Notice

[SOLVED] Tag scripts to not compile?

Discussion in 'Editor & General Support' started by Shushustorm, Dec 15, 2015.

  1. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Hello everyone!
    Is there a way to tag a script file that shouldn't be compiled?
    For example, when there is a script with errors in your project that you don't need right now, can you somehow keep working on different files and test the game without actually removing the error-containing file from the project?

    Many thanks for any ideas,
    Greetings,
    Shu
     
  2. Yowling-Cat-Games

    Yowling-Cat-Games

    Joined:
    Dec 11, 2014
    Posts:
    37
    Just make a folder under your assets "WebPlayerTemplates" and put stuff you don't want to compile..
    i.e. scripts with errors your not using, but will fix later, just take them off the object or 'tick' disable button on
    object..

    Since this is usually ignored by the compiler since the WebPlayerTemplates" could contain .js files (web-javascript files) which shouldn't be compiled in Unity.

    Still works in Unity 5.1.2p2

    Lar
     
    Shushustorm likes this.
  3. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    @Yowling Cat Games
    I see! Thanks for your reply! This is very helpful!

    EDIT:
    For some reason, though, putting a file there seems to reimport all assets. At least that's what is happening in my project.
     
  4. Yowling-Cat-Games

    Yowling-Cat-Games

    Joined:
    Dec 11, 2014
    Posts:
    37
    No problem...I use this little trick all the time... ;)
    We may not want to use a bull-horn to broadcast tho...it might go away...ha ha

    Lar
     
  5. Yowling-Cat-Games

    Yowling-Cat-Games

    Joined:
    Dec 11, 2014
    Posts:
    37
    What version of Unity you using?

    I use 5.1.2p2 and works O.K. ...no loading of assets...

    Lar
     
  6. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I am using 5.3.0 on OSX. When it finished loading, I will try again, though. Maybe it was a strange sporadic bug.
     
  7. Yowling-Cat-Games

    Yowling-Cat-Games

    Joined:
    Dec 11, 2014
    Posts:
    37
    I'm also on OS 10.9.5 I have 5.3.0 and I'll try it also...

    EDIT: Just tried on 5.3.0 and worked ...no problem...did get the warning of script not found
    on a object but I just 'ticked' the check mark on the script and...warnings gone...




    Lar
     
    Shushustorm likes this.
  8. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I tried again and it worked without reimporting the assets now! Seems to have been a sporadic bug. Thanks again! :D
     
    Yowling-Cat-Games likes this.
  9. Yowling-Cat-Games

    Yowling-Cat-Games

    Joined:
    Dec 11, 2014
    Posts:
    37
    Your Welcome... ;)

    Lar
     
    Shushustorm likes this.