Determining CPU on Windows Store Apps in Unity

edited in General
Hey guys we just added a blog with the code on discovering the CPU type a Windows Store application is running on. This helps us scale up for Windows x86 versus ARM tablets without the hassles of maintaining to separate build paths.

The full unity package is there for download too.

http://blog.celestial-games.com/2014/01/determine-cpu-and-count-in-unity.htm

Feel free to comment here just didn't want to cut and paste the whole blog over again.

PS :( this only works in Unity pro sorry that's a bit sucky I know.
Thanked by 1mattbenic

Comments

  • This is very cool. Thanks for sharing!
  • Awesome! Thanks for the share
  • edited
    Dunno if this helps at all, but there's the Unity SystemInfo class that I believe is intended to be used for stuff like that.
  • @Elyaradine yip you are quite correct however I find the result been in string format to be a bit hard to nail down a CPU set. The output is in the following format on my machine

    Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz

    I prefer the Enum list returned from the Windows API that specifically identifies ARM, I7 etc. as apposed to a string that is hard to tie down a reg-ex for determining exactly what will be returned each time. Also it was an opportunity to experiment with adding c++ dll's to Unity a dangerous idea to say the least.
    Thanked by 1hermantulleken
  • edited
    Ah, okay! :panda:
  • @tbulford How difficult was it to get the C++ DLL talking to Unity? I did it with C# (and it just works), but not C++ (and in my experience when it comes to C++ nothing just works e v e r).
  • Actually surprisingly painless. I just integrated functions and not a class. So I guess it's really c not c++. The total effort was an hour or so.

    The code for c++ and Unity is on the blog. Nothing outrageous needed really. Just so long as you already understand how to package DLLs into different folders for different versions.
    Thanked by 1hermantulleken
Sign In or Register to comment.