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 bill · Nov 17, 2009 at 07:29 PM · optimizationdllnamespacelink

Dynamic linking library more optimized?

What is more vs optimized? Using a c# dll or just sticking everything in unity without a namespace?

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

3 Replies

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

Answer by jashan · Dec 09, 2009 at 06:10 PM

Regarding performance, there is simply no difference at all.

Regarding workflow: It very much depends on your project size and how much code you want to reuse. It may be helpful to have several Visual Studio projects that go into several DLLs, using namespaces etc.; if you have very large projects and a lot of code you want to reuse. For smaller projects, this kind of overhead won't make sense.

If you're on the iPhone, you can only have a limited amount of DLLs, so for that plattform, you should definitely keep as much as possible in the Unity project and avoid using your own DLLs.

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 Ashkan_gc · Nov 18, 2009 at 08:01 AM

scripting is a powerful tool for many tasks and it has many advantages: it is platform independent and you don't need to write different codes for different platforms. it's easier than coding in unmanaged languages like C++ but it's slower. .NET/MONO code is too fast and you don't need to use other languages in most cases but if you have algorithms that they are complex and they need to run many times it's a good idea to write them in C++ and then call them from unity. AI and path finding are good examples. there are also other situations that you need special features of a specific platform or you need to communicate with a special hardware and in those situations you need to write C++ or C code too.

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 Ricardo · Nov 19, 2009 at 05:24 PM

I'm unclear on what you mean by "vs optimized". Do you mean code performance, or Visual Studio ease of use?

On performance, the very short version is that even if you add your C# code as scripts, Unity will end up building it to a DLL. At the end of the day, it'll be the same.

Regarding Visual Studio usability, there will be no difference other than you obviously can't edit the precompiled DLL, but as long as there's a reference to it, you'll still get autocomplete and compilation working without a problem.

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

No one has followed this question yet.

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to set unity for finding the c# dll? 1 Answer

how to create a wrapper for C++ class libraries 1 Answer

Melee combat cooldown with animations 1 Answer

Using Namespaces? 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