• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ctchmos · Nov 05, 2019 at 09:56 PM · script errorcompiler errorworkflowteamsnew-feature

Workflow: How can I run a scene without fixing compiler errors?

This may sound like a silly question, but I am working on a project using Unity Teams and have a project that a few other people are able to push changes too. Sometimes these people do inadvisable things like pushing uncompilable code. Because of the way Unity works, the project will not run if any of the scripts in the project cannot be compiled, even if these scripts are not used in the current scene.


I'm looking for a way to run a scene, which should be fully functional on its own, without being stopped by a compiler error in an unused script. Bar modifying the scripts themselves. If I delete three scripts then it all runs and works, but I don't want to do that. I also don't want to have to fix someone else's compiler errors. That's not my turf.


Does such a feature exist? If not, I think one should.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by xxmariofer · Nov 05, 2019 at 10:35 PM

my only suggestion is using scripting define symbols, thats the only way i can think of. this would be an example, if you want to compile it you just go to the player settings - scripting define symbols and add/remove when needed, or create an insttuction for each level if you want them independant, this is basically how crossplatform is developed, so that only the desired code gets compiled when developing one platform

 #if UNFINISHED
 public class YourClass : MonoBehaviour
 {
     public void Awake()
     {
         int number = 5 + "COOL STUFF";
     }
 }
 #endif
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ctchmos · Nov 06, 2019 at 02:23 AM 0
Share

This is a good work around, thanks!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

117 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UnityEditor Compiling Error :: VisualStudio Crash 0 Answers

Unity 5 Mouse Look Problem 1 Answer

Unhandled Exception: System.UnauthorizedAccessException 1 Answer

Script FPS Game Emitter Compiler error,ParticleEmitter now wont work 0 Answers

the type or namespace name "PostProcessingProfile" could not be found 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges