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 Julien-Lynge · Nov 09, 2011 at 06:29 PM · dllmemory

Using Microsoft.VisualBasic (or other ways of getting memory info)

I know what you're thinking: "why on earth are you worried about Visual Basic libraries in Unity?"

I'm trying to get some system memory information, and according to this thread I can get what I need with VisualBasic.Devices. If you have other suggestions for getting memory information (e.g. RSS and available system memory), I certainly recognize that I am not a power programmer and I'm open to any suggestions.

Within Visual Studio I can add a reference to Microsoft.VisualBasic and then include it in my C# code through 'using' directives. However, I've noticed that the version being used is .NET 4.0 (so I can't just import it into Unity), and when I try to grab the .NET framework 2.0 from the Microsoft site it tells me that it's already installed, even though I only see the 3.0, 3.5, and 4.0 frameworks on my (Windows) system (Program Files\Reference Assemblies\Microsoft\Framework)

So in summary, I have 3 questions:

  • Is there a recommended way within the Unity framework to query the amount of memory in use by the application and the amount of available memory?

  • If not, is there any way to get the VisualBasic.dll for, say, .NET 4.0 to work in Unity?

  • If not, can you tell me how/where I would go about getting the VisualBasic.dll for .NET 2.0?

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
0

Answer by DaveA · Nov 09, 2011 at 11:06 PM

There may be some clues here (Windows): http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/b634cc1e-55e2-4f47-ab4d-aeca26dd26ce

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 Julien-Lynge · Nov 13, 2011 at 03:05 AM 0
Share

Dave, I'm actually looking for something that's platform independent. The suggestions on that page seem to center around kernel32.dll, which I'm guessing makes them Windows only. Of course, I hadn't thought about that with respect to VisualBasic.Devices - is that also Windows only when compiled into a $$anonymous$$ono executable?

There has to be some way or combination of ways to poll memory on Windows, $$anonymous$$ac, webplayer, and mobile.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

Memory overflow using OpenCV Imported with dll 1 Answer

How can I exclude unnecessary DLLs from my build? 2 Answers

How to link a class Library project in visual studio with my generated visual studio .sln unity project ? 1 Answer

Cannot load native dll in WebGL build 0 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