cancel
Showing results for 
Search instead for 
Did you mean: 

How to tell if a user is using the x64 or the x86 unity client

Derick_Geisend1
Champ in-the-making
Champ in-the-making

is there a property that will tell me what version of the appserver the user is connected to?  We have both the legacy x86 and the new x64 in our v18 dev system.  I'm trying to push to migrate up, but until we can fully test the x64 appserver and verify all of our integrations, i need to support both with our integration scripts.  Is there a property i can get that will tell me the architecture?  

This is for a couple of Workflow Scripts and one Autofill Keyword Set Script (third party db lookup)

1 ACCEPTED ANSWER

Scott_McLean
Elite Collaborator
Elite Collaborator

I use this:

app.Diagnostics.Write(string.Format("Executing in a {0}-bit process...", Environment.Is64BitProcess ? "64" : "32"));

If you stick that in a Unity client script, it should properly report the bitness in which the script is executing, which should match the bitness of the installed Unity client.

You could also do the same thing in a server-side Unity script to interrogate the bitness of the app server executing it.

Hope that helps,

Scott

View answer in original post

4 REPLIES 4

Alex_French
Elite Collaborator
Elite Collaborator
I would see if either of these do what you expect:

1) in the Unity API - Application.SystemProperties.ServerVersion (but maybe you're running exactly the same builds?)

2) from the .NET environment - Environment.Is64BitProcess

Scott_McLean
Elite Collaborator
Elite Collaborator

I use this:

app.Diagnostics.Write(string.Format("Executing in a {0}-bit process...", Environment.Is64BitProcess ? "64" : "32"));

If you stick that in a Unity client script, it should properly report the bitness in which the script is executing, which should match the bitness of the installed Unity client.

You could also do the same thing in a server-side Unity script to interrogate the bitness of the app server executing it.

Hope that helps,

Scott

... and I just realized that Alex already pointed this out - heh

"I successfully use" is an *answer*, much better than"maybe this?".