Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
4
Question by Ben-BearFish · Dec 29, 2015 at 05:46 PM · editorcommand-linedefine

How to put comments in the smcs.rsp file for Unity?

As mentioned at this link under the Global Custom Defines section, I'm trying to use a .rsp file to set up some compiler settings for my Unity project. I can't seem to find how to add a comment to the file to help me when referring to the file later, so I know what each command is.

According to Microsoft, to comment in a .rsp file you must put a # before the comment, but this doesn't work in Unity. Does anyone know how to add a comment in this file?

Comment
Add comment · Show 2
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 Vider5CC · Mar 25, 2016 at 06:11 PM 0
Share

Works in visual studio so it seems like unity doesn't support comments in smcs.rsp. Did you find a solution?

avatar image Vider5CC · Mar 25, 2016 at 06:25 PM 1
Share

I'm doing this right now:

 -define:commentDefinesWithCommentAreCommentedOutBecauseUnityDoesntSupportCommentsInSmcsRsp
 
 -define:CLIENT
 -define:commentSERVER
 
 -define:DEBUG
 -define:commentRELEASE

It feels so dirty. Unity devs, please add comment support in smcs.rsp.

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Bystander333 · May 09, 2019 at 04:42 PM

Bit of an old question, but needed to do it myself and found the answer. # works but don't add white space after it and enclose the line in quotes

e.g.

 #"https://issuetracker.unity3d.com/issues/serializedfield-fields-produce-field-is-never-assigned-to-dot-dot-dot-warning"
 -nowarn:0649

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
1

Answer by goodmanyouknow · Oct 09, 2016 at 09:27 AM

 hi, my friend, it seems not be suppored putting comments in rsp file, the simple solution is add a "_" in the end of you  macro, like this: -define:UNITY_EDITOR_
Comment
Add comment · 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
1

Answer by menshikh · Nov 11, 2019 at 10:01 PM

This worked for me (Unity 2019.2):

 #_This_file_contains_command_line_options_for_C#_compiler
 
 #_Suppress_warning_CS0649:_Field_'xxx'_is_never_assigned_to,_and_will_always_have_its_default_value
 #_Roslyn_compiler_team_have_implemented_DiagnosticSuppressor_API. 
 #_Wait_until_Unity_team_utilizes_it,_then_remove_this_compiler_option.
 #_https://forum.unity.com/threads/feature-request-use-new-diagnosticsuppressor-api-to-suppress-cs0649-on-serializefield.697514 
 /nowarn:0649

P.S. Leading spaces were added by web formatting and unimportant.

Comment
Add comment · 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
0

Answer by taimur_azhar · Jan 24, 2018 at 12:14 PM

Hi is there any link about how to make and use smcs.rsp file ??

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

38 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

Related Questions

how to remove the unity_editor define in web player 1 Answer

Update to 5.3.4f1 executeMethod couldn't be find in Command line arguments 0 Answers

Is it possible in Unity 5 to set a script define, wait for a recompile and then create a build from script? 1 Answer

using Unity without the editor 1 Answer

Running Unity 5.6.4 in headless throws this assert: Assertion failed on expression: 'ms_Instance != NULL' 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges