Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by darklink259 · Feb 16, 2012 at 02:26 AM · compileroptionsargumentsunsafe

Compiler options, unsafe

I would like to be able to use pointers in some C# code in Unity3d version 3.5.

It seems that the right way to do this is by setting compiler options, specifically "-unsafe".

I've tried making smcs.rsp and gmcs.rsp files in the Assets folder with the text "-unsafe" in them (as recommended elsewhere), but that does not seem to work.

I've been told that there is a property list that I should edit somewhere, but I have not been able to find it.

Any help would be much appreciated.

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 syclamoth · Feb 16, 2012 at 02:29 AM 0
Share

Nope. Sorry.

avatar image TomLeclercq · Nov 19, 2013 at 09:33 AM 1
Share

I'm trying to manage an unsafe class for many time but i can find the solution ! I've tried to build my own dll but that way i got a unhandled execption It's really making me mad ... Is there someone out there to help us ! I mean a complete solution I know i have to use 'unsafe' keycode but where do i setup unity to make it compile ? =O

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by wjmwjm119 · Mar 06, 2012 at 08:47 AM

use '-unsafe'

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 Varaughe · Sep 23, 2014 at 09:14 PM

for unity windows, smcs.rsp with -unsafe text inside it ,is my only option, also remember that the C# code itself has to be provided with an unsafe keyword ...

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 pfiguero · Jul 21, 2016 at 11:59 AM

This line:

when targeting MS compiler, csc is used with csc.rsp, etc.

at

https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

may be important to notice... I had to add that file too, so code could be exported to Visual Studio.

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

10 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

Related Questions

How to enable unsafe and use pointers 4 Answers

Optimizations in scripts 1 Answer

complier Error unexpected char' '. 1 Answer

Internal Compile Error after adding any script 0 Answers

What compiling error is this?! 1 Answer


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